Re: [PATCH 3/4] trace: add ability to collect call chain of non-currenttask.

From: Andrey Vagin
Date: Fri Dec 09 2011 - 06:08:03 EST


Hello Arun,

Agreed on remote callchains and maintaining consistency about what the
tracepoints mean.

As I said on the other thread, post-processing in userspace has the
issue that we collect more info than we actually need and under load,
perf record can't keep up.

Attached is an alternative approach that does what you allude to above.

* Your method doesn't work for rt scheduler.
* It doesn't distinguish blocking time and sleeping time.
* This patch does a bit mess between subsystems...

Yes, this method may have the right to life. Could you correct this patch and send it in lkml as a separate mail?


perf record -agPe sched:sched_switch --filter "delay > 1000000" -- sleep 1

Why do you need the option "-a" ?


allows us to collect a lot less. For some reason, "perf script" shows

the correct delay field, but the sample period still contains 1 (i.e
__perf_count() hint is not working for me).

Which kernel do you use? Does it contain "[PATCH] event: don't divide events if it has field period"? It works fine with my kernel...


-Arun


+#ifdef CONFIG_SCHEDSTATS
+ __entry->delay = next->se.statistics.block_start ? next->se.statistics.block_start
+ : next->se.statistics.sleep_start ? next->se.statistics.sleep_start : 0;
The previous code is hard to read...
+ __entry->delay = __entry->delay ? now - __entry->delay : 0;
+#else
+ __entry->delay = 0;
+#endif
next->se.statistics.{block,sleep}_start should be zeroized here, otherwise a next sched_switch will report non-zero delay again.
+ )
--
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/