From b96baad9f8f5bf04c3d136ed16fe59270ae947e9 Mon Sep 17 00:00:00 2001 From: guanglei Date: Tue, 19 Sep 2006 08:01:26 +0000 Subject: lket_trace.stp,process.stp,register_event.stp: Be sync with the runtime printing changes made by Martin lket/b2a/lket_b2a.c, lket/b2a/lket_b2a.h: Be sync with the recent runtime printing changes made by Martin. Some clean up work before adding the support of dumping data into MySQL Bug fix of segment fault when an event is not registered. --- tapset/LKET/process.stp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tapset/LKET/process.stp') diff --git a/tapset/LKET/process.stp b/tapset/LKET/process.stp index 238f1b20..84a2bd80 100755 --- a/tapset/LKET/process.stp +++ b/tapset/LKET/process.stp @@ -36,6 +36,7 @@ function process_snapshot() %{ struct task_struct *tsk; struct list_head *cur, *head; + _stp_pbuf *pb; int cpu = smp_processor_id(); char *total_length; head = &(current->tasks); @@ -47,8 +48,9 @@ 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) - total_length = &_stp_pbuf[cpu][STP_PRINT_BUF_START]; - *(int16_t *)total_length = _stp_pbuf_len[cpu] - 4; + pb = &__get_cpu_var(Stp_pbuf); + total_length = &pb->buf[0]; + *(int16_t *)total_length = pb->len - 4; #endif _stp_print_flush(); } -- cgit