This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: initialized globals
Hi -
> Yes, that's close, but read-mostly is not as strong as a constant.
> With a constant, we could propagate the literal value at
> code-generation time, optimizing the variable out.
Yeah, perhaps when optimizing at that level becomes worthwhile.
> >> * Allow importing macro values as global constants -- avoid errors
> >> in "transcribing".
> > That unfortunately depends on the kernel being compiled with
> > not just -g but -g2.
>
> The -g2 is only needed if you want the parser to understand the macro,
> right? It seems like we could just assume that the macro exists (maybe
> requiring guru mode), and then pass-4 will fail if the macro was
> specified incorrectly. [...]
Maybe, though it would require then that the translated C code include
the appropriate #include to define that macro. We would also
lose/defer some type checking.
- FChE