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:29 +0200, Rafael J. Wysocki wrote:
> On Tuesday, September 27, 2011, tom.leiming@gmail.com wrote:
> > From: Ming Lei <ming.lei@canonical.com>
> >
> > This patch introduces 3 trace points to prepare for tracing
> > rpm_idle/rpm_suspend/rpm_resume functions, so we can use these
> > trace points to replace the current dev_dbg().
> >
> > Cc: Steven Rostedt rostedt@goodmis.org
> > Signed-off-by: Ming Lei <ming.lei@canonical.com>
>
> I get the following build warning from it:
>
> GEN /home/rafael/src/build/mainline/tosh/Makefile
> CHK include/linux/version.h
> Using /home/rafael/src/linux as source for kernel
> CHK include/generated/utsrelease.h
> CALL /home/rafael/src/linux/scripts/checksyscalls.sh
> CHK include/generated/compile.h
> CC drivers/base/power/runtime.o
> CC kernel/trace/rpm-traces.o
> In file included from /home/rafael/src/linux/include/trace/ftrace.h:296:0,
> from /home/rafael/src/linux/include/trace/define_trace.h:96,
> from /home/rafael/src/linux/include/trace/events/rpm.h:99,
> from /home/rafael/src/linux/kernel/trace/rpm-traces.c:15:
> /home/rafael/src/linux/include/trace/events/rpm.h: In function ‘ftrace_raw_output_rpm_return_int’:
> /home/rafael/src/linux/include/trace/events/rpm.h:76:1: warning: format ‘%p’ expects type ‘void *’, but argument 3 has type ‘long unsigned int’
>
> Care to check?
>
> Rafael

> > +TRACE_EVENT(rpm_return_int,
> > + TP_PROTO(struct device *dev, unsigned long ip, int ret),
> > + TP_ARGS(dev, ip, ret),
> > +
> > + TP_STRUCT__entry(
> > + __string( name, dev_name(dev))
> > + __field( unsigned long, ip )
> > + __field( int, ret )
> > + ),
> > +
> > + TP_fast_assign(
> > + __assign_str(name, dev_name(dev));
> > + __entry->ip = ip;
> > + __entry->ret = ret;
> > + ),
> > +
> > + TP_printk("%pS:%s ret=%d", __entry->ip, __get_str(name),
> > + __entry->ret)
> > +);
> > +


TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
__entry->ret)

try that.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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