diff options
Diffstat (limited to 'tapset/LKET/lket_trace.stp')
-rwxr-xr-x | tapset/LKET/lket_trace.stp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tapset/LKET/lket_trace.stp b/tapset/LKET/lket_trace.stp index 32577524..81d47dd6 100755 --- a/tapset/LKET/lket_trace.stp +++ b/tapset/LKET/lket_trace.stp @@ -149,9 +149,10 @@ static inline int this_event_len(void) /* we use 2 bytes to store the length. */ #define _lket_trace(GroupID, hookID, fmt, args...) do { \ if(timing_method == TIMING_GETCYCLES) { \ - _stp_printf("%2b%2n%8b%8b"fmt, (_FMT_)0, \ + _stp_printf("%2b%2n%8b%8b%8b"fmt, (_FMT_)0, \ (_FMT_)get_cycles(), \ - (_FMT_)((int64_t)current->pid << 32 | \ + (_FMT_)((int64_t)current->pid << 32 | (int32_t)current->tgid),\ + (_FMT_)((int64_t)current->parent->tgid << 32 | \ (int32_t)GroupID << 24 | (int32_t)hookID << 16 | \ (int16_t)current->thread_info->cpu << 8), \ args); \ @@ -159,17 +160,19 @@ static inline int this_event_len(void) else if(timing_method == TIMING_GETTIMEOFDAY) { \ struct timeval tv; \ do_gettimeofday (&tv); \ - _stp_printf("%2b%2n%8b%8b"fmt, (_FMT_)0, \ + _stp_printf("%2b%2n%8b%8b%8b"fmt, (_FMT_)0, \ (_FMT_)(tv.tv_sec*1000000LL + tv.tv_usec), \ - (_FMT_)((int64_t)current->pid << 32 | \ + (_FMT_)((int64_t)current->pid << 32 | (int32_t)current->tgid),\ + (_FMT_)((int64_t)current->parent->tgid << 32 | \ (int32_t)GroupID << 24 | (int32_t)hookID << 16 | \ (int16_t)current->thread_info->cpu << 8), \ args); \ } \ else { \ - _stp_printf("%2b%2n%8b%8b"fmt, (_FMT_)0, \ + _stp_printf("%2b%2n%8b%8b%8b"fmt, (_FMT_)0, \ (_FMT_)pfn_schedclock(), \ - (_FMT_)((int64_t)current->pid << 32 | \ + (_FMT_)((int64_t)current->pid << 32 | (int32_t)current->tgid),\ + (_FMT_)((int64_t)current->parent->tgid << 32 | \ (int32_t)GroupID << 24 | (int32_t)hookID << 16 | \ (int16_t)current->thread_info->cpu << 8), \ args); \ |