Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4623410rwb; Tue, 8 Aug 2023 11:05:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH34fSBbBn0KjQdRSoUP2d4Ray8vYnmpDMIQYq+ITQLd8X0r4mUqjdS1pErrYHEiFl4uiBA X-Received: by 2002:a17:906:8455:b0:991:f427:2fdf with SMTP id e21-20020a170906845500b00991f4272fdfmr305325ejy.76.1691517959068; Tue, 08 Aug 2023 11:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691517959; cv=none; d=google.com; s=arc-20160816; b=lC4schjO0hfGlxvPkQkfiWffUlF1E5kwf067ujL9egYtmlxDTPzd3wL3Fxibls+vnh r/muSrMNsPKVpiQVExCwtqWS2x5CrhAV7wWfH83MOzQEYaQ+SsrLXyItp/zJu1XVBRa4 2oYpeuvM6nnTncLrKZZZXVv3ykJ1i04rfk+gtUXk3Mrd/LlX81kPgObKZPkVi67z+rHj cOvc/c+6tZxwyNys1M45FMXrbT1qGYllNKgGspoMiqeRNOvDlQPLRz9CmxglLZWkc5Tm ADlJyO4+3HJC8pfJ2PU5/AX9uV7LfDW2GNj76dRXe2h5aQfz047DtBsshsnoT1kywJo2 8wdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=Y0viXXrjSYe6Ps2aV/zTrfaBONBuRhMdDsfFGAJ9Wuo=; fh=fvvK/ucY+3o/NQ6lMRLNsszacBsqsXQuXrtPCPHlMPY=; b=rOuIQEIVpG45EuDpHQq0ccU85F0xpytDYbf1a24wNazUKyM27chrWCUPgtk2/Vb/tk 42iqTOqkB8ejNniCY2OBUZD7uWM6NrX6RmZKWxIWdcLCFaVISr7dX/R5xuCabfBvh600 Ql/+Y43lOSpz3wSal/g4La2KJpJh2XQ2LDB1Mefq6VAIwkDHXM5qsROV4+YGnqqmbzUn lUBP0HEomJ1jzOSJlnV09h2OanvomsfM4amf6ZJLtx/H2hRvVDdI2UJ1Au75xW3dX0aQ d2WIr8sQfNOoTTfySCxkmekiKyPXEFcoE9FPT1VM++t91uXvEdYgiidOQ7uKV+bpPqsA Koqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CfDpSfG1; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170906688900b0099cc50f304csi4681294ejr.291.2023.08.08.11.05.26; Tue, 08 Aug 2023 11:05:59 -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=@kernel.org header.s=k20201202 header.b=CfDpSfG1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234599AbjHHRZw (ORCPT + 99 others); Tue, 8 Aug 2023 13:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234409AbjHHRZ0 (ORCPT ); Tue, 8 Aug 2023 13:25:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 371022026E; Tue, 8 Aug 2023 09:10:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5BBC162581; Tue, 8 Aug 2023 13:44:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91514C433C7; Tue, 8 Aug 2023 13:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691502268; bh=165v6ztCDvMJ/HSN+1gMRXHQMbHSzSTFK8zwklWCxf0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CfDpSfG1F30WhwUb6geTO9+v8jU8e2B1RWzfa5/da5ZQvIh/MiYEg57B8Iws9NsOm 5+lpVIhaAzeob/BQOl5yCHZq6Gg4AfkIGG6CMMLv67HpAa5Vng4ImGQuKWklbsoVLK +pTFadUF8cPMs516PY3GtzZega7YPuKTGFPFM57eb/KllES9m6+3966peVEiQL3yDg CBu9jVzDHE/Udr1FsQlIKwdUE+m1NKmtra7Tb1kE79mm66CF6YELdTEUIeJrkwp3ZB YfbeUGS4EUsPCF+lYy1OkRyrh7yyLi24+Tq9aqcbH3fi7KaxYMwNsH7+tlzUAF7T97 prTunXxulzZ0w== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 14A83404DF; Tue, 8 Aug 2023 10:44:26 -0300 (-03) Date: Tue, 8 Aug 2023 10:44:26 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim , Ivan Babrou Cc: Ian Rogers , linux-perf-users@vger.kernel.org, kernel-team@cloudflare.com, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter Subject: Re: [PATCH] perf script: print cgroup on the same line as comm Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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 Em Mon, Aug 07, 2023 at 11:02:01AM -0700, Ivan Babrou escreveu: > On Fri, Jul 28, 2023 at 10:57 AM Ian Rogers wrote: > > On Fri, Jul 28, 2023 at 10:42 AM Ivan Babrou wrote: > > > On Mon, Jul 17, 2023 at 5:07 PM Ivan Babrou wrote: > > > > Commit 3fd7a168bf51 ("perf script: Add 'cgroup' field for output") > > > > added support for printing cgroup path in perf script output. > > > > It was okay if you didn't want any stacks: > > > > $ sudo perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup > > > > jpegtran:23f4bf 3321915 [013] 404718.587488: /idle.slice/polish.service > > > > jpegtran:23f4bf 3321915 [031] 404718.592073: /idle.slice/polish.service > > > > With stacks it gets messier as cgroup is printed after the stack: > > > > $ perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup,ip,sym > > > > jpegtran:23f4bf 3321915 [013] 404718.587488: > > > > 5c554 compress_output > > > > 570d9 jpeg_finish_compress > > > > 3476e jpegtran_main > > > > 330ee jpegtran::main > > > > 326e2 core::ops::function::FnOnce::call_once (inlined) > > > > 326e2 std::sys_common::backtrace::__rust_begin_short_backtrace > > > > /idle.slice/polish.service > > > > jpegtran:23f4bf 3321915 [031] 404718.592073: > > > > 8474d jsimd_encode_mcu_AC_first_prepare_sse2.PADDING > > > > 55af68e62fff [unknown] > > > > /idle.slice/polish.service > > > > > > > > Let's instead print cgroup on the same line as comm: > > > > > > > > $ perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup,ip,sym > > > > jpegtran:23f4bf 3321915 [013] 404718.587488: /idle.slice/polish.service > > > > 5c554 compress_output > > > > 570d9 jpeg_finish_compress > > > > 3476e jpegtran_main > > > > 330ee jpegtran::main > > > > 326e2 core::ops::function::FnOnce::call_once (inlined) > > > > 326e2 std::sys_common::backtrace::__rust_begin_short_backtrace > > > > > > > > jpegtran:23f4bf 3321915 [031] 404718.592073: /idle.slice/polish.service > > > > 8474d jsimd_encode_mcu_AC_first_prepare_sse2.PADDING > > > > 55af68e62fff [unknown] > > > > > > > > Signed-off-by: Ivan Babrou > > > > Fixes: 3fd7a168bf51 ("perf script: Add 'cgroup' field for output") > > This change makes sense to me. Namhyung, wdyt? > Hi Namhyung, > > This is a really trivial patch and it would be good to get a word from you. Hi, this solves the case for cgroup and I think it should be merged, but what about the other fields that are being printed after the callchain gets printed? I looked and we would have to introduce a __sample__fprintf_sym that didn't call sample__fprintf_callchain and use it in perf script's process_event() then later call sample__fprintf_callchain after all the fields that print on the same line. Anyway, Namhyung, can I have your Acked-by for this patch to move things forward at least for cgroups? - Arnaldo