summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--main.cxx2
-rw-r--r--tapsets.cxx10
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index dacb581a..1c344a2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-09-07 Frank Ch. Eigler <fche@redhat.com>
+ * main.cxx (main): Choose getpid()-based module names.
+ * tapsets.cxx: Make timer.jiffies' use of task_pt_regs __i386__-only.
+
+2005-09-07 Frank Ch. Eigler <fche@redhat.com>
+
* stap.1.in: Oops, && and || do short-circuit.
2005-09-06 Frank Ch. Eigler <fche@elastic.org>
diff --git a/main.cxx b/main.cxx
index c6663655..dcdf67f5 100644
--- a/main.cxx
+++ b/main.cxx
@@ -116,7 +116,7 @@ main (int argc, char * const argv [])
s.test_mode = false;
s.guru_mode = false;
s.last_pass = 5;
- s.module_name = "stap_" + stringify(getuid()) + "_" + stringify(time(0));
+ s.module_name = "stap_" + stringify(getpid());
s.keep_tmpdir = false;
s.cmd = "";
s.target_pid = 0;
diff --git a/tapsets.cxx b/tapsets.cxx
index 4b5edd18..3ab070b0 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2238,11 +2238,13 @@ timer_derived_probe::emit_probe_entries (translator_output* o, unsigned j)
o->newline() << "c->probe_point = probe_point;";
o->newline() << "c->last_error = 0;";
o->newline() << "c->nesting = 0;";
- o->newline() << "if (in_interrupt())";
- o->newline(1) << "c->regs = 0;";
- o->newline(-1) << "else";
+ o->newline() << "c->regs = 0;";
+
+ o->newline() << "#ifdef __i386__"; // task_pt_regs is i386-only
+ o->newline() << "if (! in_interrupt())";
o->newline(1) << "c->regs = task_pt_regs (current);";
- o->indent(-1);
+ o->newline(-1) << "#endif";
+
o->newline() << "c->actioncount = 0;";
// NB: locals are initialized by probe function itself