Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4637272rwb; Tue, 8 Aug 2023 11:18:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjPYpqYPxYHGuPZSmNlkVLFkawLAJwj4OPkvJ8eV/cgyNrmV7Y22lxSMb1/hXNh6QM9u/b X-Received: by 2002:a05:6808:54:b0:3a3:e61a:c7d8 with SMTP id v20-20020a056808005400b003a3e61ac7d8mr457454oic.59.1691518683519; Tue, 08 Aug 2023 11:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518683; cv=none; d=google.com; s=arc-20160816; b=FNtZ9ku9xuHAvRsxtE765rnkPLvbphpQO7dePJkpUocM2nv2OkdWOAP4TzC1yThFeE 8eV5DWs6fynflrKe6IlDaEDkKUDPVujTO2TNR4/m09gTVNRhey1Atc+8jB/8jh18T7E/ B9DVtHfnDWv8yTWGgd7EHjPbMLRypqbj3oBD/51JzI6hpgCfzOCY8MOStx75+sdGB6gA DLoopFKK2jdIqbGOJFm2qrD4o0d8HBdAPm3Yj2hf8Ind7ZlvYhX3gGSkWL6zUdDmFoLu 4Wql2i/obOSzR2nXuDEEVW9/VrjD/sQC8nRnJAS7iONKB3+kWs70gRKv/fnceqMThMz6 Mxrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=7T6SwuU8/QFB47USiHSD/p8w4tGd9hRlysIqkG7YNs4=; fh=8zX3lvs9XqhwXzHy73KBZ3FndDF4ZTbhGdFMMdsSzJg=; b=zcucxBT8gUlUeMgsIpZiKldnwE6rzozMlGAP6fqIXtq/bbHruG23NOKIEjPKRVGvj1 UOl46TwzMSCzb7dUG0CuhAQNPYkiRblyBTfiI9n42Yc0b9KUkwCD/G0pt68QGj605T8J fXVXFW+9GzotfWUEiZoVUp3xOewaHhAbiXWsKEe6oTzcKeP+jUIr2LKpTVEJJq84PVVt tBLrh/kDlijjCuQIA88WdUKVjUKRq33vGG3/wJm+SHVon8zAMc12+kqKdcA7U0weTpuL huKB/csGh9pe0WD/vv/SVzeyb47ksOxHLw+1xR70G2cNQu1XmLJkoOmWgOHPFUZinXGV aN6A== ARC-Authentication-Results: i=1; mx.google.com; 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 b23-20020a17090a101700b002691d885301si7766799pja.0.2023.08.08.11.17.51; Tue, 08 Aug 2023 11:18:03 -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; 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 S230198AbjHHRwY convert rfc822-to-8bit (ORCPT + 99 others); Tue, 8 Aug 2023 13:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234954AbjHHRvU (ORCPT ); Tue, 8 Aug 2023 13:51:20 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFD39B5E9E; Tue, 8 Aug 2023 09:23:02 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2685102cd16so3152495a91.1; Tue, 08 Aug 2023 09:23:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691511466; x=1692116266; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RyjB3DvpLyVB9YtJshIE8bO28uWsWCZqV/6QNano1sw=; b=dVsdXUTbeBJhdpOPqX7FV5I2HBtH8Mspj68hHJykcAjQT6FCVxAdkiBs5Ci09D5slA pM+9TO+zPFx0zpw02NwiS+REi8T+0RHIaKHCbxkLS6ozPqt9j/Vp7VI3StMMTnGeiKaa KY52BZxZYex8Gf9hDf82QNR6PwQ9gq5S41WK1nUW/kAwG9Ka54mwN3tyiL0mQWaKygvu 9uqeTtGCy+zksk6zAatklEnpiEcGfVPQmg87bow8BkGdMulz9MBTj2OISdWg3rcGMLJQ LHhZTnvgjscFattF2VYvMgwDtXrRRTnBgumj83fIMSgjcIKRIBHM9Zf5LJtSLg9j7+sQ G1Xw== X-Gm-Message-State: AOJu0YxN2RNPgDpx1g5jhmSq0opPREuv5GMflmED+oIP8ZmpxFLgqeTw eJfrXHaUwDtg0gKbCDPRJRmmdIYyzLQ0lU68bY5mIT0r X-Received: by 2002:a25:d0d1:0:b0:d4f:7f64:df19 with SMTP id h200-20020a25d0d1000000b00d4f7f64df19mr5934415ybg.14.1691502577549; Tue, 08 Aug 2023 06:49:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Tue, 8 Aug 2023 22:49:26 +0900 Message-ID: Subject: Re: [PATCH] perf script: print cgroup on the same line as comm To: Arnaldo Carvalho de Melo Cc: Ivan Babrou , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hello, Sorry for the late reply. On Tue, Aug 8, 2023 at 10:44 PM Arnaldo Carvalho de Melo wrote: > > 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? I'm ok with the change itself. But I'm afraid other fields might be changed too. Anyway, Acked-by: Namhyung Kim Thanks, Namhyung