On Thu, 14 May 2020 10:12:22 +0300 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > +static int print_pointer(struct trace_seq *s, const char *format, int plen, > + void *data, int size, > + struct tep_event *event, struct tep_print_arg *arg) > +{ > + unsigned long long val; > + int ret = 1; > + > + switch (*format) { > + case 'F': > + case 'f': > + case 'S': > + case 's': > + ret += print_function(s, format, data, size, event, arg); > + break; > + case 'M': > + case 'm': > + ret += print_mac_arg(s, format, data, size, event, arg); > + break; > + case 'I': > + case 'i': > + ret += print_ip_arg(s, format, data, size, event, arg); > + break; > + case 'U': > + ret += print_uuid_arg(s, format, data, size, event, arg); > + break; > + case 'h': > + ret += print_raw_buff_arg(s, format, data, size, event, arg, plen); > + break; > + default: > + ret = 0; > + val = eval_num_arg(data, size, event, arg); > + if (event->tep->long_size == 4) > + trace_seq_printf(s, "0x%lx", (long)val); > + else > + trace_seq_printf(s, "0x%llx", (long long)val); Hmm, this failed my tests as it changes the output of what use to be printed. At least for val == 0. 778c778 < sleep-3946 [001] 111.264656: kfree: call_site=c029dbb5 ptr=0x0 --- > sleep-3946 [001] 111.264656: kfree: call_site=c029dbb5 ptr=(nil) It use to print "(nil)" but now prints 0x0. The old way for %p would just use the '%p' format. I'd like to keep that the same for this. -- Steve > + break; > + } > + > + return ret; > + > +} > +