diff options
Diffstat (limited to 'tapset/LKET')
-rw-r--r-- | tapset/LKET/Changelog | 8 | ||||
-rwxr-xr-x | tapset/LKET/lket_trace.stp | 6 | ||||
-rwxr-xr-x | tapset/LKET/process.stp | 6 | ||||
-rwxr-xr-x | tapset/LKET/register_event.stp | 6 |
4 files changed, 19 insertions, 7 deletions
diff --git a/tapset/LKET/Changelog b/tapset/LKET/Changelog index 99e8d3ab..7bdae3fa 100644 --- a/tapset/LKET/Changelog +++ b/tapset/LKET/Changelog @@ -2,6 +2,14 @@ From Gui Jian <guijian@cn.ibm.com> + * lket_trace.stp,process.stp,register_event.stp: Be + sync with the runtime printing changes made by Martin + + +2006-09-19 Li Guanglei <guanglei@cn.ibm.com> + + From Gui Jian <guijian@cn.ibm.com> + * rpc.stp: New trace hooks for RPC activities on client, server and scheduler. * register_event.stp: Add the register_sys_event() calls diff --git a/tapset/LKET/lket_trace.stp b/tapset/LKET/lket_trace.stp index 5764892a..57c4c96d 100755 --- a/tapset/LKET/lket_trace.stp +++ b/tapset/LKET/lket_trace.stp @@ -183,9 +183,9 @@ static inline int this_event_len(void) function update_record() %{ #if !defined(ASCII_TRACE) - int cpu = smp_processor_id(); - char *total_length = &_stp_pbuf[cpu][STP_PRINT_BUF_START]; - *(int16_t *)total_length = _stp_pbuf_len[cpu] - 4; + _stp_pbuf *pb = &__get_cpu_var(Stp_pbuf); + 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 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(); } diff --git a/tapset/LKET/register_event.stp b/tapset/LKET/register_event.stp index 8579e9c3..ac05b71a 100755 --- a/tapset/LKET/register_event.stp +++ b/tapset/LKET/register_event.stp @@ -70,6 +70,7 @@ function register_event(grpid:long, hookid:long, evt_type:long, fmt:string, name char in_fmt[512], in_name[512]; char *p_in_fmt, *p_in_name; char *fmt, *name; + _stp_pbuf * pb; int cpu = smp_processor_id(); char *total_length; p_in_fmt = in_fmt; @@ -112,8 +113,9 @@ function register_event(grpid:long, hookid:long, evt_type:long, fmt:string, name THIS->hookid, THIS->fmt, THIS->names); #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(); |