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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 18 Jul 2013 15:12:39 +0000
From:	Shuah Khan <shuah.kh@...sung.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	"len.brown@...el.com" <len.brown@...el.com>,
	"pavel@....cz" <pavel@....cz>, "rjw@...k.pl" <rjw@...k.pl>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>,
	"joe@...ches.com" <joe@...ches.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"shuahkhan@...il.com" <shuahkhan@...il.com>,
	Shuah Khan <shuah.kh@...sung.com>
Subject: Re: [PATCH v3] power: new trace event to print device suspend and
 resume time

On 07/18/2013 08:21 AM, Steven Rostedt wrote:
> On Thu, 2013-07-18 at 14:00 +0000, Shuah Khan wrote:
>
>>>
>>> Don't you want to convert the ops_time on display? You can have:
>>>
>>> 	TP_printk("%s %s parent=%s state=%s ops=%snsecs=%lld err=%d",
>>> 		__get_str(driver), __get_str(device), __get_str(parent),
>>> 		__get_str(pm_event_str), __get_str(pm_ops),
>>> 		ktime_to_ns(__entry->ops_time), __entry->error)
>>>
>>>
>>> -- Steve
>>
>> I decided to pass in the converted value to the tracepoint. Please see
>> the drivers/base/power/main.c call to trace_device_pm_report_time()
>
> But why? You are still doing the calculation in the fast path. The
> TP_printk() is in the slow path. Why add overhead to the execution of
> the code?
>
> -- Steve

Yes. You are right. I want to avoid passing in ktime_t, I can still do 
that without doing the conversion in fast path. I could pass in tv64 
value and do the conversion in TP_printk.

Hopefully I will get this right this time. This is my first tracepoint. 
Thanks for your patience.

-- Shuah

-- 
Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@...sung.com | (970) 672-0658
--
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