Re: [PATCH v3] power: new trace event to print device suspend andresume time

From: Steven Rostedt
Date: Thu Jul 18 2013 - 10:21:59 EST


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

>
> +
> + trace_device_pm_report_time(dev_name(dev), dev_driver_string(dev),
> + dev->parent ? dev_name(dev->parent) : "none",
> + info ? info : "none ",
> + (s64) ktime_to_ns(delta), pm_verb(state.event),
> + error);
>
> -- Shuah
>
> Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research
> America (Silicon Valley) shuah.kh@xxxxxxxxxxx | (970) 672-0658


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