summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorguanglei <guanglei>2006-09-23 14:15:48 +0000
committerguanglei <guanglei>2006-09-23 14:15:48 +0000
commitd0114f122c7e04f4f46bc2a5af72dc94af697437 (patch)
treeaeb041fc1f389b3c09c0497454e8ad50cc121ad9 /tapset
parent43d7488cffb2e6eab87af36b8db51e60acb2f5c5 (diff)
downloadsystemtap-steved-d0114f122c7e04f4f46bc2a5af72dc94af697437.tar.gz
systemtap-steved-d0114f122c7e04f4f46bc2a5af72dc94af697437.tar.xz
systemtap-steved-d0114f122c7e04f4f46bc2a5af72dc94af697437.zip
register_event.stp, process.stp, lket_trace.stp:
Change to per_cpu_ptr(Stp_pbuf, smp_processor_id()) to get the per-cpu printing buffer
Diffstat (limited to 'tapset')
-rw-r--r--tapset/LKET/Changelog7
-rwxr-xr-xtapset/LKET/lket_trace.stp4
-rwxr-xr-xtapset/LKET/process.stp4
-rwxr-xr-xtapset/LKET/register_event.stp4
4 files changed, 13 insertions, 6 deletions
diff --git a/tapset/LKET/Changelog b/tapset/LKET/Changelog
index 7bdae3fa..09d11a7a 100644
--- a/tapset/LKET/Changelog
+++ b/tapset/LKET/Changelog
@@ -1,3 +1,10 @@
+2006-09-23 Li Guanglei <guanglei@cn.ibm.com>
+
+ * register_event.stp, process.stp, lket_trace.stp: Change to
+ per_cpu_ptr(Stp_pbuf, smp_processor_id()) to get the per-cpu
+ printing buffer
+
+
2006-09-19 Li Guanglei <guanglei@cn.ibm.com>
From Gui Jian <guijian@cn.ibm.com>
diff --git a/tapset/LKET/lket_trace.stp b/tapset/LKET/lket_trace.stp
index 57c4c96d..32577524 100755
--- a/tapset/LKET/lket_trace.stp
+++ b/tapset/LKET/lket_trace.stp
@@ -183,8 +183,8 @@ static inline int this_event_len(void)
function update_record()
%{
#if !defined(ASCII_TRACE)
- _stp_pbuf *pb = &__get_cpu_var(Stp_pbuf);
- char *total_length = &pb->buf[0];
+ _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id());
+ char *total_length = &(pb->buf[0]);
*(int16_t *)total_length = pb->len - 4;
#endif
%}
diff --git a/tapset/LKET/process.stp b/tapset/LKET/process.stp
index 84a2bd80..90c5e7a1 100755
--- a/tapset/LKET/process.stp
+++ b/tapset/LKET/process.stp
@@ -48,8 +48,8 @@ function process_snapshot()
_lket_trace(_GROUP_PROCESS, _HOOKID_PROCESS_SNAPSHOT, "%4b%4b%4b%0s",
(_FMT_)tsk->pid, (_FMT_)tsk->tgid, (_FMT_)tsk->parent->tgid, tsk->comm);
#if !defined(ASCII_TRACE)
- pb = &__get_cpu_var(Stp_pbuf);
- total_length = &pb->buf[0];
+ pb = per_cpu_ptr(Stp_pbuf, smp_processor_id());
+ total_length = &(pb->buf[0]);
*(int16_t *)total_length = pb->len - 4;
#endif
_stp_print_flush();
diff --git a/tapset/LKET/register_event.stp b/tapset/LKET/register_event.stp
index ac05b71a..d1aaec17 100755
--- a/tapset/LKET/register_event.stp
+++ b/tapset/LKET/register_event.stp
@@ -113,8 +113,8 @@ function register_event(grpid:long, hookid:long, evt_type:long, fmt:string, name
THIS->hookid, THIS->fmt, THIS->names);
#if !defined(ASCII_TRACE)
- pb = &__get_cpu_var(Stp_pbuf);
- total_length = &pb->buf[0];
+ pb = per_cpu_ptr(Stp_pbuf, smp_processor_id());
+ total_length = &(pb->buf[0]);
*(int16_t *)total_length = pb->len - 4;
#endif
_stp_print_flush();