lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201109272236.03683.rjw@sisk.pl>
Date:	Tue, 27 Sep 2011 22:36:03 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	tom.leiming@...il.com, stern@...land.harvard.edu,
	linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	mingo@...hat.com, fweisbec@...il.com,
	Ming Lei <ming.lei@...onical.com>
Subject: Re: [PATCH v1 1/2] PM/runtime: introduce trace points for tracing rpm_* functions

On Tuesday, September 27, 2011, Steven Rostedt wrote:
> On Tue, 2011-09-27 at 22:29 +0200, Rafael J. Wysocki wrote:
> > On Tuesday, September 27, 2011, tom.leiming@...il.com wrote:
> > > From: Ming Lei <ming.lei@...onical.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@...dmis.org
> > > Signed-off-by: Ming Lei <ming.lei@...onical.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.

Well, that certainly will work, but is it the right fix?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ