Bug 3635 - reduce number of global objects
Summary: reduce number of global objects
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 16:27 UTC by Frank Ch. Eigler
Modified: 2007-10-02 21:41 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2006-12-04 16:27:17 UTC
In order to further reduce our consumption of ppc TOC entries,
consider revamping the way script globals (and their locks) are
emitted by the translator.  It may be sufficient to plop them
all into a single global struct, like this:

BEFORE:  int64_t global_var;
         rwlock_t global_var_lock;
         int64_t global_var2;
         rwlock_t global_var2_lock;
         ...

AFTER:   struct globals {
            int64_t var;
            rwlock_t var_lock;
            int64_t var2;
            rwlock_t var2_lock;
            ...
         } globals;

Of course, code that refers to the values would have to adapt.
Comment 1 Frank Ch. Eigler 2007-10-02 21:41:11 UTC
patch committed