Re: [PATCH 1/3] clocksource: exynos_mct: Fix ftrace

From: Doug Anderson
Date: Mon Jun 16 2014 - 12:35:14 EST


Daniel,

On Mon, Jun 16, 2014 at 1:52 AM, Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
> Hi Dough,
>
> thanks for the explanation. I still don't get why it is important to keep
> others users of mct traceable because it is quite slow ? May be it is what
> you explained here, but I miss the connection between 'the other users' <->
> 'traceable' <-> 'because slow'.

It stems from the fact that one use of trace is to figure out why
things are slow. In that case you want to make sure that the slow
things are traceable.

I can run the following:

cd /sys/kernel/debug/tracing
echo nop > current_tracer
echo 0 > options/sleep-time
echo 0 > options/graph-time
echo 1 > function_profile_enabled
~/gettimeofday 100000
echo 0 > function_profile_enabled

Then I can see this:

Function Hit Time Avg
s^2
-------- --- ---- ---
---
__getnstimeofday 100005 258267.8 us 2.582
us 447196.9 us
do_gettimeofday 100004 252395.6 us 2.523
us 462549.6 us
SyS_gettimeofday 100004 249353.6 us 2.493
us 1223308 us
getnstimeofday 100005 246217.2 us 2.462
us 369149.8 us
exynos4_frc_read 101096 181620.0 us 1.796
us 157413.8 us

...if I mark exynos4_frc_read() as notrace then it doesn't show up in
the profile, which is unfortunate.

NOTE: the above profile is a bit misleading in terms of actual time
taken my belief is that we end up with some confusing numbers since
profiling uses the MCT itself (I think) to record how long a function
took to execute. Despite this it's still awfully nice that
exynos4_frc_read() actually shows up in the trace...
--
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/