Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4634653rwb; Tue, 8 Aug 2023 11:15:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqpnvx1Y3O1P74hmCYn9dvRccIVksuUyEorNWCIrGdn1091/D8pupQuP20FTNuSZxlH/RL X-Received: by 2002:a05:6a00:1884:b0:66c:6678:3776 with SMTP id x4-20020a056a00188400b0066c66783776mr344810pfh.7.1691518543479; Tue, 08 Aug 2023 11:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518543; cv=none; d=google.com; s=arc-20160816; b=v0viNwTnHkRRDnWghZ/0Cy4BHLnKkgUfjWgOCd8S+DK+BsoYlHVXg6XjB7nXRWL2L1 bbtUSu7vhUrtqdlG40yj1DLuNAqapHkXPsqR//ZdE4795WXRIYBHdJZ0m3iiB82CT7ND ODcctrgdacFAC0sJXM3aT13WsObuM3Fbx2IZeh49v1u66xmrYHd5863/4ViJgwDz0qcK TunDnVM+nURIBB0hgOE8IOlV6ZRJJ5XhH41Qjhs7/wZscynbHx1YTGUmSbKjSBGWoRlO 2fP0ZXoiU2Wl1k0/JZ+WmN4W/OSJvKtiwlkMN85xC66nDQ6WoN9/UMi57wD2sL50CABI CIsg== 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:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bQKKZ6f3T6LfcBll+FT1OFMXGH5mIrp79DLbNiDPWmE=; fh=fvvK/ucY+3o/NQ6lMRLNsszacBsqsXQuXrtPCPHlMPY=; b=bSKju6JRCbO4rxGQekCilYOWW/p9uD+9xL8HsXKI/Tytqg/S14c6v36F6TDOh9KnSe i+tKqYEsm8hnwj/eguZQCl/jThl+6IBDKzLwtHGYRYkr8P+Q3HIjCwjqkdM6GeovBJaA ABAdAftngti8qIcZHNbshw0QWxf+eTxbnttV1QcK4yKiEE2Tn95r8wnRXLFxTNAZ5/dX RB82qb4M4PuLnh3LlXhGdpNBHZ5LdcxNWRtY/GsM2sK9RI02DFXnqSsobHVE1vS52zHE wdYulFpeSoHhx174CAKNF9cfHD1vgewLwYXMiEgBjSTWUa2QkMrWZB30V+UTg66aHp8m To+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Avjv6yfy; 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 i131-20020a636d89000000b00563e652b06fsi5614521pgc.893.2023.08.08.11.15.29; Tue, 08 Aug 2023 11:15:43 -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=Avjv6yfy; 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 S234968AbjHHRqx (ORCPT + 99 others); Tue, 8 Aug 2023 13:46:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234805AbjHHRpm (ORCPT ); Tue, 8 Aug 2023 13:45:42 -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 5E62125EF4; Tue, 8 Aug 2023 09:20:46 -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)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B0E1C62584; Tue, 8 Aug 2023 13:48:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF99C433C7; Tue, 8 Aug 2023 13:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691502502; bh=78w+7dkfFtK7dL4kn2g0lfF/02wfP7Nhon1XKyRpSpE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Avjv6yfyDTyTM0f83g7YdgTrvEheCdOzZFbRLI5TlArHSsiy7fQZyhEDoP4wkigkg F2ySJsiwEn+KHyuYpMlJttGnzEMfMBO4bdzAOzLsECgctWBblbE3+YeiMBYswKZ92O 1+ie9OHQacqMABW9oYstbWc42TRWrM2e4fEB5QjvwFomAEeG6TJoGmTg+0ukMnnJOC 4/chym1Q/BNYwAjNkd7uaPStqk49zlvi5VsIZbnB9NfmRwTOom/hrOvc/2inQ4cFJM QovfYpYbJnlJloPZ8SLxGTXDSGCfL/qBYmfNj2oxBIO3P9GLQUbjYOD6HN8a1Qu6L6 jxQlSi7SUZC8g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5D5E0404DF; Tue, 8 Aug 2023 10:48:19 -0300 (-03) Date: Tue, 8 Aug 2023 10:48:19 -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: References: 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 Tue, Aug 08, 2023 at 10:44:26AM -0300, Arnaldo Carvalho de Melo escreveu: > 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. Nah, or simply moving sample__fprintf_sym() to the end of that function. - Arnaldo > Anyway, Namhyung, can I have your Acked-by for this patch to move things > forward at least for cgroups?