summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-09-22 17:35:54 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-09-22 17:37:01 -0400
commit759e1d7665f9367650262b0aae18c18e3cc8d60f (patch)
treea44bbc48dd83274dcc3254daf765d240b6e82d71 /tapsets.cxx
parent4ad42007734cc4c12b9addd67542f4f76230434e (diff)
downloadsystemtap-steved-759e1d7665f9367650262b0aae18c18e3cc8d60f.tar.gz
systemtap-steved-759e1d7665f9367650262b0aae18c18e3cc8d60f.tar.xz
systemtap-steved-759e1d7665f9367650262b0aae18c18e3cc8d60f.zip
optimization: reduce generated C code size
* tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): Don't emit unnecessary 0 initializers for .tfi and .sdt_semaphore_addr.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 8dda3918..0767d4bf 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -4457,15 +4457,14 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "{";
string key = make_pbm_key (p);
unsigned value = module_index[key];
- s.op->line() << " .tfi=" << value << ",";
+ if (value != 0)
+ s.op->line() << " .tfi=" << value << ",";
s.op->line() << " .address=(unsigned long)0x" << hex << p->addr << dec << "ULL,";
s.op->line() << " .pp=" << lex_cast_qstring (*p->sole_location()) << ",";
s.op->line() << " .ph=&" << p->name << ",";
map<derived_probe*, Dwarf_Addr>::iterator its = s.sdt_semaphore_addr.find(p);
- if (its == s.sdt_semaphore_addr.end())
- s.op->line() << " .sdt_sem_address=(unsigned long)0x0,";
- else
+ if (its != s.sdt_semaphore_addr.end())
s.op->line() << " .sdt_sem_address=(unsigned long)0x"
<< hex << its->second << dec << "ULL,";