summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-12-02 15:16:10 -0600
committerDavid Smith <dsmith@redhat.com>2009-12-02 15:16:10 -0600
commit4a0ae64c47b159d4dd0ea471f1f8044503843a7f (patch)
treeec5733d43362d0302138e69130f95c3b677f0de7 /tapsets.cxx
parentc10fce7d6aaa57a4f94f9d7aeea906597456f7ce (diff)
downloadsystemtap-steved-4a0ae64c47b159d4dd0ea471f1f8044503843a7f.tar.gz
systemtap-steved-4a0ae64c47b159d4dd0ea471f1f8044503843a7f.tar.xz
systemtap-steved-4a0ae64c47b159d4dd0ea471f1f8044503843a7f.zip
Fix PR 11034 by directly allocating per-cpu context data.
* translate.cxx (emit_common_header): Change type of 'contexts' to an array of struct context pointers. (emit_module_init): Allocate a context structure for each possible cpu. Free each if an error occurs. (emit_module_exit): Update contexts reference. Free each possible cpu's context structure. * tapsets.cxx (common_probe_entryfn_prologue): Use array instead of percpu data for context structure.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 7bae4615..51f1ccc9 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -100,7 +100,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr,
o->newline(1) << "goto probe_epilogue;";
o->indent(-1);
- o->newline() << "c = per_cpu_ptr (contexts, smp_processor_id());";
+ o->newline() << "c = contexts[smp_processor_id()];";
o->newline() << "if (atomic_inc_return (& c->busy) != 1) {";
o->newline(1) << "#if !INTERRUPTIBLE";
o->newline() << "atomic_inc (& skipped_count);";