This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: initialized globals
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: <systemtap at sources dot redhat dot com>
- Date: Wed, 6 Sep 2006 13:23:15 -0700
- Subject: RE: initialized globals
On Wednesday, September 06, 2006 11:46 AM, Frank Ch. Eigler wrote:
> Hi -
>
>> The next steps I see for this:
>> * Allow global constants -- no need for read locks, and enables
>> optimizations like value propagation.
>
> Technically, these are independent things, but yes: bug #2341.
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.
>> * 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.
I just looked through the archives and realized that we've discussed
this before, so I won't hash on it too much. I still think it has merit
though, and may be possible without -g2 information.
Josh