From 9915575b17cdf08dc523f927e424d3982d4ed787 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 26 Apr 2008 14:48:51 -0400 Subject: revert commit f0e6dc6304; overload detection logic was fine already btw, here's a test script to monitor the persistent context values: function cycles(which:long) %{ THIS->__retvalue = (THIS->which == 0) ? CONTEXT->cycles_base : CONTEXT->cycles_sum; %} probe timer.profile { /* just for */ backtrace() /* load generation */ printf("%d %d\n", cycles(0), cycles(1)) } probe timer.s(1) { exit() } --- tapsets.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 23e85a0e..c10196e2 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -216,10 +216,16 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "#ifdef STP_TIMING"; o->newline() << "c->statp = 0;"; o->newline() << "#endif"; + // NB: The following would actually be incorrect. + // That's because cycles_sum/cycles_base values are supposed to survive + // between consecutive probes. Periodically (STP_OVERLOAD_INTERVAL + // cycles), the values will be reset. + /* o->newline() << "#ifdef STP_OVERLOAD"; o->newline() << "c->cycles_sum = 0;"; o->newline() << "c->cycles_base = 0;"; o->newline() << "#endif"; + */ } -- cgit