Re: [PATCH v2 2/2] perf sched timehist: Remove BUG_ON in timehist_sched_change_event()

From: Namhyung Kim
Date: Mon Aug 12 2024 - 15:04:13 EST


On Mon, Aug 12, 2024 at 09:26:06PM +0800, Yang Jihong wrote:
> The BUG_ON(thread__tid(thread) != 0) in timehist_sched_change_event()
> is redundant, remove it.
> No functional change.
>
> Fixes: 07235f84ece6 ("perf sched timehist: Add -I/--idle-hist option")
> Signed-off-by: Yang Jihong <yangjihong@xxxxxxxxxxxxx>

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung


> ---
> tools/perf/builtin-sched.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 177634df1ba5..309dcfb3796d 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -2700,8 +2700,6 @@ static int timehist_sched_change_event(struct perf_tool *tool,
> struct idle_thread_runtime *itr = (void *)tr;
> struct thread_runtime *last_tr;
>
> - BUG_ON(thread__tid(thread) != 0);
> -
> if (itr->last_thread == NULL)
> goto out;
>
> --
> 2.25.1
>