Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1043946pxb; Wed, 6 Apr 2022 07:24:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/I9WnPZ8Tq9sORXgSWnXFjFwnZks6suILQ4ELcv7ZqpeG3ec9oMkXXPzRS46qELDp1q37 X-Received: by 2002:a17:902:d4c6:b0:156:78c:8486 with SMTP id o6-20020a170902d4c600b00156078c8486mr8999704plg.85.1649255043012; Wed, 06 Apr 2022 07:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649255043; cv=none; d=google.com; s=arc-20160816; b=A/zNTD4HOUjIYbJzSITgLRcw8Tq98GMrHvO3SvjpKjpwVV69tT8ia7IWBy7r9Y4hLX CxI1+cft/FtlOL68UdrwSgqxbseHI1zVYA/+/YWqyQXY2/LeX3PRnxEN47b+Qaky8jpX pedEyIcmialnVa7SyXyiKbi/eQmnTPwy5isikb0lJhS8duuBemvk3dXkVU6QW5e1MVDC WMkCWuU0vh/rjSwmz4yGYvG+RFxuVBdYayHaOW3bNvWILcW8CaHNArDydTayJB+othJ/ cVOS+8LbrNbv99axAsqcxNaQF/ZlXfjB7pSXoVTgNxqUTaR6F2FQeD2N2Q+YWoOsH8Rz mP+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J6+fmy47OF5z2SJSEG6D8iNGmfcfPNsRECoHcacT8KY=; b=W/5wa8Mw42OENtJ4ichAPpDjr3g0Svx2fWHfBrqy2R8rfTr0AYouWIUDWT7spaiBqq OmF23f4+VkRiNRYw0No7NCbE4yB7ws1UCS/YRUgd6z1pn2Pfe18+H8lVq4t3y1tzrPHK GnGD5eYTsVwjt233xcFWfdcmjVVTZarfhA0vAlfhhRahyOSefzb20U7C1HgD0hCQzotO 4hDV79GzgaUjev6t3lM13jAheCIEQcy/u+14TR8HhmM1liRYjxghqNJYRWQTjw5+L7X1 I3Ts9jQH2fQHfXnrz5LiiDEiDJ405Y45twpRaOUVPZ4XvbaM1Frbu/1dkNJ+UQBk/+6e EVkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r10-20020a63d90a000000b00399149a5d14si10218228pgg.205.2022.04.06.07.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:24:03 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BE42C4ED063; Wed, 6 Apr 2022 05:08:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231503AbiDFMAD (ORCPT + 99 others); Wed, 6 Apr 2022 08:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbiDFL6Z (ORCPT ); Wed, 6 Apr 2022 07:58:25 -0400 Received: from euporie.uberspace.de (euporie.uberspace.de [185.26.156.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 420405282F2 for ; Wed, 6 Apr 2022 00:29:23 -0700 (PDT) Received: (qmail 8439 invoked by uid 989); 6 Apr 2022 07:29:22 -0000 Authentication-Results: euporie.uberspace.de; auth=pass (plain) From: Florian Fischer To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Florian Schmaus , Florian Fischer Subject: [PATCH v2 4/4] perf util: add 'us' unit to the rusage time events Date: Wed, 6 Apr 2022 09:28:39 +0200 Message-Id: <20220406072839.107519-5-florian.fischer@muhq.space> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406072839.107519-1-florian.fischer@muhq.space> References: <20220406072839.107519-1-florian.fischer@muhq.space> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Bar: ---- X-Rspamd-Report: R_MISSING_CHARSET(0.5) MIME_GOOD(-0.1) REPLY(-4) MID_CONTAINS_FROM(1) BAYES_HAM(-1.955753) X-Rspamd-Score: -4.555753 Received: from unknown (HELO unkown) (::1) by euporie.uberspace.de (Haraka/2.8.28) with ESMTPSA; Wed, 06 Apr 2022 09:29:22 +0200 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FROM_SUSPICIOUS_NTLD, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 --- tools/perf/util/parse-events.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 5c84d5d43bff..13db69b71187 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -421,6 +421,10 @@ static int add_event_tool(struct list_head *list, int *idx, free((char *)evsel->unit); evsel->unit = strdup("ns"); } + else if (tool_event == PERF_TOOL_RU_UTIME || tool_event == PERF_TOOL_RU_STIME) { + free((char *)evsel->unit); + evsel->unit = strdup("us"); + } return 0; } -- 2.35.1