[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d2c81e7-b9d8-c153-608b-6464a10949d8@linux.dev>
Date: Tue, 27 Sep 2022 16:37:44 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Rong Tao <rtoax@...mail.com>
Cc: Rong Tao <rongtao@...tc.cn>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] samples/bpf: offwaketime: pretty print
On 9/25/22 7:22 PM, Rong Tao wrote:
> From: Rong Tao <rongtao@...tc.cn>
>
> A sample of call stack:
> swapper/10 [
> secondary_startup_64_no_verify
> cpu_startup_entry
> do_idle
> schedule_idle
> __schedule
> __traceiter_sched_switch
> __traceiter_sched_switch
> -
> try_to_wake_up
> call_timer_fn
> __run_timers.part.0
> run_timer_softirq
> __softirqentry_text_start
> __irq_exit_rcu
> sysvec_apic_timer_interrupt
> asm_sysvec_apic_timer_interrupt
> cpuidle_enter_state
> cpuidle_enter
> cpuidle_idle_call
> do_idle
> cpu_startup_entry
> secondary_startup_64_no_verify
> ] swapper/10 1
>
> Signed-off-by: Rong Tao <rongtao@...tc.cn>
> ---
> samples/bpf/offwaketime_user.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/samples/bpf/offwaketime_user.c b/samples/bpf/offwaketime_user.c
> index b6eedcb98fb9..d89278d62e4e 100644
> --- a/samples/bpf/offwaketime_user.c
> +++ b/samples/bpf/offwaketime_user.c
> @@ -30,9 +30,9 @@ static void print_ksym(__u64 addr)
> }
>
> if (PRINT_RAW_ADDR)
> - printf("%s/%llx;", sym->name, addr);
> + printf("\t%s/%llx\n", sym->name, addr);
The origin commit intention is to have an external script for post processing.
Beside, there are bcc, bpftrace, and libbpf-tools which are better places to
have different output options. The current code is good enough for sample
purpose and no need for unnecessary code churn.
Powered by blists - more mailing lists