]> sourceware.org Git - systemtap.git/commitdiff
Only include unwaddr in context for ia64. Not used on any other arch.
authorMark Wielaard <mjw@redhat.com>
Wed, 7 Jul 2010 09:01:43 +0000 (11:01 +0200)
committerMark Wielaard <mjw@redhat.com>
Wed, 7 Jul 2010 09:37:10 +0000 (11:37 +0200)
* translate.cxx (c_unparser::emit_common_header): Don't add unwaddr field
  to context struct except for ia64.
* tapsets.cxx (common_probe_entryfn_prologue): Only initialized unwaddr
  on ia64.
  (dwarf_derived_probe::emit_probe_local_init): Only call bspcache on ia64.
* runtime/regs-ia64.c: Don't define (empty) bspcache for other arches.

runtime/regs-ia64.c
tapsets.cxx
translate.cxx

index e5594c40dfd7cb23a3e715c4ed94d9d47d7a35c1..aadcd98fdf90620f7a00eeadc556193fdcac2514 100644 (file)
@@ -134,10 +134,6 @@ static void ia64_store_register(int regno,
        return;
 }
 
-#else /* if defined __ia64__ */
-
-#define bspcache(cache, regs) do {} while(0)
-
 #endif /* if defined __ia64__ */
 
 
index 629d6b64b270bc3e3264ddbd20132bfc3b4b9954..07c6feb56adee3dce421f9a48b09d4eaf7feb086 100644 (file)
@@ -138,7 +138,9 @@ common_probe_entryfn_prologue (translator_output* o, string statestr,
   o->newline() << "c->last_error = 0;";
   o->newline() << "c->nesting = -1;"; // NB: PR10516 packs locals[] tighter
   o->newline() << "c->regs = 0;";
+  o->newline() << "#if defined __ia64__";
   o->newline() << "c->unwaddr = 0;";
+  o->newline() << "#endif";
   o->newline() << "c->probe_point = " << probe << ".pp;";
   o->newline() << "#ifdef STP_NEED_PROBE_NAME";
   o->newline() << "c->probe_name = " << probe << ".pn;";
@@ -4002,7 +4004,9 @@ dwarf_derived_probe::emit_probe_local_init(translator_output * o)
   if (access_vars)
     {
       // if accessing $variables, emit bsp cache setup for speeding up
+      o->newline() << "#if defined __ia64__";
       o->newline() << "bspcache(c->unwaddr, c->regs);";
+      o->newline() << "#endif";
     }
 }
 
index 5fdc37c65d6c10ba901ba1c6740557f3605923fb..e8d4a0b510b66f3ffd1f7f79412ea30c9a71ef93 100644 (file)
@@ -927,8 +927,10 @@ c_unparser::emit_common_header ()
   // When it's "something", probe code unwinds, _stp_error's, sets error state
   o->newline() << "const char *last_stmt;";
   o->newline() << "struct pt_regs *regs;";
+  o->newline() << "#if defined __ia64__";
   o->newline() << "unsigned long *unwaddr;";
   // unwaddr is caching unwound address in each probe handler on ia64.
+  o->newline() << "#endif";
   o->newline() << "struct kretprobe_instance *pi;";
   o->newline() << "int pi_longs;"; // int64_t count in pi->data, the rest is string_t
   o->newline() << "int regparm;";
This page took 0.055948 seconds and 5 git commands to generate.