Hello,
On Fri, Mar 3, 2023 at 3:53 AM Chunxin Zang <[email protected]> wrote:
>
> 'perf sched latency' is incorrect to get process schedule latency
> when it used 'sched:sched_wakeup' to analysis perf.data.
>
> Because 'perf record' prefer use 'sched:sched_waking' to
> 'sched:sched_wakeup' since commit d566a9c2d482 ("perf sched: Prefer
> sched_waking event when it exists"). It's very reasonable to
> evaluate process schedule latency.
>
> Similarly, update sched latency/map/replay to use sched_waking events.
Have you checked if it works ok when data has both wakeup and
waking events?
>
> Signed-off-by: Chunxin Zang
> Signed-off-by: Jerry Zhou
Missing email addresses.
Otherwise looks good.
Thanks,
Namhyung
> ---
> tools/perf/builtin-sched.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 86e18575c9be..1af4ec1ac824 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1819,6 +1819,7 @@ static int perf_sched__read_events(struct perf_sched *sched)
> const struct evsel_str_handler handlers[] = {
> { "sched:sched_switch", process_sched_switch_event, },
> { "sched:sched_stat_runtime", process_sched_runtime_event, },
> + { "sched:sched_waking", process_sched_wakeup_event, },
> { "sched:sched_wakeup", process_sched_wakeup_event, },
> { "sched:sched_wakeup_new", process_sched_wakeup_event, },
> { "sched:sched_migrate_task", process_sched_migrate_task_event, },
> --
> 2.25.1
>
>
> 声明:这封邮件只允许文件接收者阅读,有很高的机密性要求。禁止其他人使用、打开、复制或转发里面的任何内容。如果本邮件错误地发给了你,请联系邮件发出者并删除这个文件。机密及法律的特权并不因为误发邮件而放弃或丧失。任何提出的观点或意见只属于作者的个人见解,并不一定代表本公司。