summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2007-03-16 15:29:34 +0000
committerdsmith <dsmith>2007-03-16 15:29:34 +0000
commita58d79d097f6b801eb3a57cf928b515d8eccdf98 (patch)
tree695b4d1460269a65fa5d7ac696d13e24bacd397e /translate.cxx
parent79e2a42ea0f5a51a4b0dcc2dfc63518c2d7ca2cb (diff)
downloadsystemtap-steved-a58d79d097f6b801eb3a57cf928b515d8eccdf98.tar.gz
systemtap-steved-a58d79d097f6b801eb3a57cf928b515d8eccdf98.tar.xz
systemtap-steved-a58d79d097f6b801eb3a57cf928b515d8eccdf98.zip
2007-03-16 David Smith <dsmith@redhat.com>
PR 3545. * tapsets.cxx (common_probe_entryfn_prologue): Added 'overload_processing' parameter, which defaults to true. If overload_processing is set to false, doesn't output the STP_OVERLOAD code. (common_probe_entryfn_epilogue): Ditto. (be_derived_probe_group::emit_module_decl): Set overload_processing to false in calls to common_probe_entryfn_prologue and common_probe_entryfn_epilogue since begin/end probes shouldn't overload the system. * translate.cxx (c_unparser::emit_common_header): Emit STP_OVERLOAD global variables. (translate_pass): Emit STP_OVERLOAD defines.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx
index 2d826dca..36530373 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -822,6 +822,10 @@ c_unparser::emit_common_header ()
o->newline() << "#ifdef STP_TIMING";
o->newline() << "Stat *statp;";
o->newline() << "#endif";
+ o->newline() << "#ifdef STP_OVERLOAD";
+ o->newline() << "cycles_t cycles_base;";
+ o->newline() << "cycles_t cycles_sum;";
+ o->newline() << "#endif";
o->newline() << "union {";
o->indent(1);
@@ -4082,11 +4086,25 @@ translate_pass (systemtap_session& s)
s.op->newline() << "#define MINSTACKSPACE 1024";
s.op->newline() << "#endif";
+ // Overload processing
+ s.op->newline() << "#ifndef STP_OVERLOAD_INTERVAL";
+ s.op->newline() << "#define STP_OVERLOAD_INTERVAL 1000000000LL";
+ s.op->newline() << "#endif";
+ s.op->newline() << "#ifndef STP_OVERLOAD_THRESHOLD";
+ s.op->newline() << "#define STP_OVERLOAD_THRESHOLD 500000000LL";
+ s.op->newline() << "#endif";
+ // We allow the user to completely turn overload processing off
+ // (as opposed to tuning it by overriding the values above) by
+ // running: stap -DSTP_NO_OVERLOAD {other options}
+ s.op->newline() << "#ifndef STP_NO_OVERLOAD";
+ s.op->newline() << "#define STP_OVERLOAD";
+ s.op->newline() << "#endif";
+
if (s.bulk_mode)
s.op->newline() << "#define STP_BULKMODE";
if (s.timing)
- s.op->newline() << "#define STP_TIMING" << " " << s.timing ;
+ s.op->newline() << "#define STP_TIMING";
if (s.perfmon)
s.op->newline() << "#define STP_PERFMON";