Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1652818rwb; Tue, 27 Sep 2022 16:48:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7w2J/ezmayx0WDHD1Jws4s8SCplUXZvPJzkRPbaMXLt9moUuIk8kAcjwdpTFLtmW1spiBd X-Received: by 2002:a17:907:3e85:b0:73d:60cc:5d06 with SMTP id hs5-20020a1709073e8500b0073d60cc5d06mr25717104ejc.722.1664322526798; Tue, 27 Sep 2022 16:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664322526; cv=none; d=google.com; s=arc-20160816; b=jDMSRfeW3kqMZGYXf2wTcWomZfpw0B/JAwgWYNOBiu0Ibbmh8CqoHi8qC0wuOMcXE2 Lwr2ulXTZvb7BAaEI6cLCpYh25p9Lh6pVgfWF6w0sOo7PeKPppjnCu3+MqCuVZNiqd8Z vSlOUB65N0edVhGtj6oG6LTYNKzfT4qDSnZMyMDhnV5z5YjYhQ9199PN3oHky14+cj2N eJNUC6SUUod4k0jRYtkUB4CaZs3QaFA1aR8jvl7RnsidCqz729/vHVgfqMuj68FiqOKe 6HHimcfGwQu9F93EcF5A8Erhfkpc/6fLI3ODE07Ceq4dBYqnaVsSr9joBwTGA8XjBYZu 0AjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=NJ7/GjwO5s3/ginJgteWz0r6uzF1YuNFPNCQEpTVgMU=; b=HddbN7RqcktZHSPvsqBMQeer9PbDOepi8hd/+q1qas1kyt7SMszCXm7Q5SJvQYKMIy nG+FfcrntmZVgwyWZdKWlpbrUQFdndmikIbo9fLPfigZgUIW5nQqyCs1PTelDNajstmn 9LSRgyJEoO0JEbZI7ZOMFIIUfSngqJu4ylH+EU3moD1oOueiLpk5ohHYNI035r/I3UYg bnDov4O5MlTLp5M34SZj+jbARB5fYE5gKJDit6WFaP6DDOmr2PxexLegJZKrCxsV06iS 6vHf1UAoPlakZFW8n8BsJSgeBb6Y3s4MhetL0/7tjRrewAgJ9cwN7mSQopEbJXf/+wxM nfpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Iqz19tkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji13-20020a170907980d00b0073d6ad8251asi3373572ejc.812.2022.09.27.16.48.21; Tue, 27 Sep 2022 16:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Iqz19tkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231899AbiI0XiD (ORCPT + 99 others); Tue, 27 Sep 2022 19:38:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiI0XiA (ORCPT ); Tue, 27 Sep 2022 19:38:00 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F166E1D1E1A; Tue, 27 Sep 2022 16:37:58 -0700 (PDT) Message-ID: <1d2c81e7-b9d8-c153-608b-6464a10949d8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1664321877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NJ7/GjwO5s3/ginJgteWz0r6uzF1YuNFPNCQEpTVgMU=; b=Iqz19tkvvyFkJkeNoOree+vsCZ3s93kTzq11StWbOi+2u4ykiHzzr2Ff2tyNkEXkZzSS6T ILdIyDrV4NIuIVIHq2A2TN1zWTJJhPtUnDvJDHLOAE04mV8CnXTeBq5fNKaNfYUdSPa+Lf NjRfUeE80YHt/WpwzJGePdOxc//7ITs= Date: Tue, 27 Sep 2022 16:37:44 -0700 MIME-Version: 1.0 Subject: Re: [PATCH bpf-next] samples/bpf: offwaketime: pretty print Content-Language: en-US To: Rong Tao Cc: Rong Tao , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/25/22 7:22 PM, Rong Tao wrote: > From: Rong Tao > > 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 > --- > 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.