Re: [PATCH] perf report: Add 'tgid' sort key

From: Ian Rogers
Date: Tue Feb 11 2025 - 17:43:27 EST


On Wed, Feb 5, 2025 at 4:01 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> Sometimes we need to analyze the data in process level but current sort
> keys only work on thread level. Let's add 'tgid' sort key for that as
> 'pid' is already taken for thread.
>
> This will look mostly the same, but it only uses tgid instead of tid.
> Here's an example of a process with two threads (thloop).
>
> $ perf record -- perf test -w thloop
>
> $ perf report --stdio -s tgid,pid -H
> ...
> #
> # Overhead Tgid:Command / Pid:Command
> # ........... ..........................
> #
> 100.00% 2018407:perf
> 50.34% 2018407:perf
> 49.66% 2018409:perf
>
> Suggested-by: Stephane Eranian <eranian@xxxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>

Thanks,
Ian