Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1035008pxb; Fri, 22 Apr 2022 17:27:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/PeupRZKk124nGIUIewzg7Qv7kKQJJPKfIwkz4zV1VdSkWmiXCbI0OYlX22YmdGnNZKle X-Received: by 2002:a17:90b:1c86:b0:1bf:2a7e:5c75 with SMTP id oo6-20020a17090b1c8600b001bf2a7e5c75mr8213643pjb.145.1650673663321; Fri, 22 Apr 2022 17:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650673663; cv=none; d=google.com; s=arc-20160816; b=g39BMmAaAbEoqnxBFVqDeTyHMSxajl7xRAavnaW8DHTqjEWjCf9yyVlSAIA/JHDfsJ t/9WhpsIl5G3aPG1pn2GtYDgbDrRMLr9GD5tm71BYQDl3UX1psR9n8yeZMWg7swSH8ab 6ckgHC+54GRxST1RW05qYHqtw5Vas2MNwaHHYBy20MS3zF5HuNBPb+piKlMdJSH8TumV KScZifJPiX3D6Fqd7730KgAoIZXBgbkKPj/eGWBSRy2PZIHvg6FkyewXMm5NY++S5Ku+ kgdnr/c01+D4+3LlvDayWmuH337FJu1skzrJG7qn70mqzxO1GfJYSKNsfGgyrvcOvKqn 830A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xsvO2wMB3Qbk/iytHzkt7IglSjEYbp/i0Cu+gkwdE44=; b=StP8VWaxy4Mep6OS5mMj8hKqGDzRLdZlb3XBc4W6Q11wS63cV1+s3BdvBsGpg2z5Pc PzucjL2S+YkyOmzUpQpTYBqCvoNcKqNX9omrfghP81+jBTkNtBqFcPNuTpW9M+qQIIIk MqalYKzT6B90eB76GAetpj4lfygKG5oLN/NVNb8BO4Tu7W8H6EEXCOeK/HdVxQj2/yyJ KETf+vSdUZav1VLOsSUy2Siil4nBlJbzTkj9YgqfHTXdLXDmmqibeEn5+NQPqwFmIOH8 2WFrH+hG++PN1FLlzYsAhNtpGdaZuya+IAxcLCuGusEqBHqQFKTxqH20hvQDPE7bF9/0 fNMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QTMnY2AJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w12-20020a170902e88c00b0015908285c86si10422477plg.447.2022.04.22.17.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 17:27:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QTMnY2AJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 812EE187469; Fri, 22 Apr 2022 16:54:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230438AbiDVXzK (ORCPT + 99 others); Fri, 22 Apr 2022 19:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiDVXzI (ORCPT ); Fri, 22 Apr 2022 19:55:08 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9AF13F4E; Fri, 22 Apr 2022 16:52:13 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id p10so16852305lfa.12; Fri, 22 Apr 2022 16:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xsvO2wMB3Qbk/iytHzkt7IglSjEYbp/i0Cu+gkwdE44=; b=QTMnY2AJSnPps5jnuwUy0IP3g9WIU7vI2GX27pJHOpnbbtPaRa+vQEmZFfNUkXkmDZ SEzwmZQtzHCI4fOj6Rjh3G6vnouUPLcSt5gjptd0b5YhvwnqttqFH4vV3YbpJocDAYBz vCHo9u1/cYRJ28jtI3UdcqSgiZLI70n4L0+jNSCA65HWDTIm9Oh1u1jysrm9K0CtlJAd f1Zpf4DJhQdpSFE/zC0JLnjNEoNIrGH4p8kZrGvZUO7n3KdfYAYeD6tZFnaB7AOE/9my W6rMyEFemk/ePCVZGUbV9JWkbKQURYRc0u2BMqPoMVbDU3StBwVKyQeoR6rPfjkcO/up bVxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xsvO2wMB3Qbk/iytHzkt7IglSjEYbp/i0Cu+gkwdE44=; b=P8KOOZTYIQwmPLezcv1nL/Tkf+ZW/1ZfL5gzPtFqVzsTC70o+eDEHvCfR3vGAxdx/7 ey/xg4YgCRXK1P2eDY58GFxhtriPfqVaa3mGeJAsMo2z9vuTzh7m0qlQZSHQhyT7nBli JOFws5eE/a3bRNQ6ChdYKX8h1UrZVvn3z8D5buEKTrt6uk/qNhKPS50tGJighl3JPwgP SK6tkbqvtK0DTsg9uPAWah5vOKeMWKVbcp4HL1x9JbwU13UQ+qHd8p5S4Qmk58RKzi4s McgInRYmf9LF7Qdkw0j6+zpJrrSpbhOTNSBGJZPLJFIggNZQ3I6TImuUSgLM8e4GxynO izyg== X-Gm-Message-State: AOAM5315WGZYODyoo/+vdL9IPISmYCD0RjD+NDoTQsZVQMaCrONTIf6H KqCUXmX4oX8Vu46ldA86ImgvZReKIrMg/n86Qck= X-Received: by 2002:ac2:5dd3:0:b0:471:f6fd:441e with SMTP id x19-20020ac25dd3000000b00471f6fd441emr211405lfq.454.1650671531572; Fri, 22 Apr 2022 16:52:11 -0700 (PDT) MIME-Version: 1.0 References: <20220420102354.468173-1-florian.fischer@muhq.space> In-Reply-To: From: Namhyung Kim Date: Fri, 22 Apr 2022 16:52:00 -0700 Message-ID: Subject: Re: [PATCHSET v4 next 0/3] perf stat: add user_time and system_time tool events To: Arnaldo Carvalho de Melo Cc: Florian Fischer , linux-perf-users , Ian Rogers , Xing Zhengjun , linux-kernel , Peter Zijlstra , Ingo Molnar Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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, On Fri, Apr 22, 2022 at 3:05 PM Arnaldo Carvalho de Melo wrote: > > Em Wed, Apr 20, 2022 at 12:23:51PM +0200, Florian Fischer escreveu: > > This patch series adds new internal events to perf stat exposing the times spend > > in user and kernel mode in nanoseconds reported by rusage. > > > > During some benchmarking using perf it bothered me that I could not easily > > retrieve those times from perf stat when using the machine readable output. > > > > But perf definitely knows about those values because in the human readable output > > they are present. > > > > Therefore I exposed the times reported by rusage via the new tool events: > > user_time and system_time. > > > > This allows to retrieved them in machine-readable output: > > > > $ ./perf stat -x, -e duration_time,user_time,system_time,cache-misses -- grep -q -r duration_time tools/perf > > 72134524,ns,duration_time:u,72134524,100.00,, > > 65225000,ns,user_time:u,65225000,100.00,, > > 6865000,ns,ssystem_time:u,6865000,100.00,, ssystem? Looks like a typo. Anyway it looks a little bit strange to me if we can get system time in user mode only (the 'u' modifier). Thanks, Namhyung > > 38705,,cache-misses:u,71189328,100.00,, > > > > The changes are mostly inspired by the code for the only other available > > tool event: 'duration_time'.