lkml.org 
[lkml]   [2011]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 1/2] PM/runtime: introduce trace points for tracing rpm_* functions
From
Date
On Tue, 2011-09-27 at 22:36 +0200, Rafael J. Wysocki wrote:

> > TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
> > __entry->ret)
> >
> > try that.
>
> Well, that certainly will work, but is it the right fix?

Hehe, yes! The pS means to take a pointer and return the string version
of the address. Like "schedule+0x3a". __entry->ip is the address of the
function that called it __THIS_IP__ but we want to convert that into a
string name.

We use ip because both perf and trace-cmd should be smart enough to
parse it too. As they both store the kallsyms into the data file.

The (void *) is used because pS wants a pointer, and we stored the
address as an unsigned long.

-- Steve




\
 
 \ /
  Last update: 2011-09-27 22:45    [W:0.085 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site