Message ID | 20210519071939.1598923-4-leo.yan@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=N8cr=KO=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FFE8C43460 for <linux-arm-kernel@archiver.kernel.org>; Wed, 19 May 2021 07:22:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B051F60725 for <linux-arm-kernel@archiver.kernel.org>; Wed, 19 May 2021 07:22:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B051F60725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G+TSwrx/UA9Q4rErhVVrZ2mCXqveZRSvVEUAwQHCud8=; b=EPTqhCIKfH27gLYoutGTzBO30 tdcMpBV73XXCPuwot2+/tYxkLvHOZiagJ5UkdW6Y+8YgFGA8npbOeuXPOweyQ1p1SyqIng33FxJcM Sb/KDYKQ664QijxY3EnkKDnxcQi6A/ZUS/+unzpLLsrhD3H8U4LCQc/mj2epIQd3Hvo1tieAdRtgx i3c7YWleDATE2/wxlQzf5d3Y9TnJwY4ej8OkMD5tPhg3md1ScGSYHGfJiynofnIcTe9vbhK3aWO0h U84pg/SQM8r/VptmvY+YaaCdEUT4wJSaFCzMGeyscURFlLyK4QvRHS0Kx66J+Tv3oQcH3+YHMKEQh EPdRzPUBA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljGVJ-0038hx-8a; Wed, 19 May 2021 07:20:29 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGUq-0038ar-VU for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 07:20:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=0xZ1JYU86x9GDV6Fl4hcG6dEfcPMAOex7K5iW9hqWQM=; b=1AKUD2mdYNlE0xX8MJG/w1OmSz s5XouTICZ6n3mwdbQxXTAte2nv/Yi0znGo0fH6j6TnToPBet3SHiWpC+VdHN50EVESSMUbVRICfW1 tVVayYMrfnYqCwnG+whvaGg7xVfc4wQNA+DzBTHJZOIQ2bHKZzcn9CjdFDf/Ru0GDf3zxtQ/PFuml Ba2FamMBSAN2/O4jdnERc/TFlbkah40TEoxqCbQB2kjogPCbjfV+bKraiTmZGj6T1iO+xWEaJ6UQW 80H6LtT6hY3mEFispYEl9Z2XZosBEL1JtD3QpGcbvTU/fN6ZSp04wyQRS1lc9nWA5DBAcEGfLsFCX kh+7sSLQ==; Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGUo-00FDJ9-IU for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 07:19:59 +0000 Received: by mail-pf1-x429.google.com with SMTP id x18so4977776pfi.9 for <linux-arm-kernel@lists.infradead.org>; Wed, 19 May 2021 00:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0xZ1JYU86x9GDV6Fl4hcG6dEfcPMAOex7K5iW9hqWQM=; b=U6+8lJ4Pk8JtHFn8B024BbgRWRFCyCrkDS0Bgs8PLztCnYHkfhatiRfpMWjiupEcbw VWSNho5nhCcuqMwrsP3+97N0oCgO55Nmt9yrooRm4khn+AUa3GHRIjgyiBb2HydObi5r XIHkFtW9YXZ5hnqV2qWhjy4xCiLqtuApq30qrKI/iTn3QKnFythlXlyLKSxmp1bDGo7T WtNKIDrIo8g07o2/M9A+4syHOxP1NtVEXlxz6HhKP5UsXaeIfLmFTQhqZsMzypzsNwiu P7nXmkz2Be/mo70TN1OXu6sk4r2j0maJDqHoNViETayhTVyJSMF/QEOc2GaK+ufAGk+L 6NeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0xZ1JYU86x9GDV6Fl4hcG6dEfcPMAOex7K5iW9hqWQM=; b=VYUlGO8Xa2OUAzIgVfUyiNzIX28JEJ8X4OEHvfjz+p71/4URbh5evyGTU0PfjP/DqL Sky/jrQEjnFJlbtc/Zi/FO9ABu04Ka7YnEfWtvnCgW902uJhRqhQwPAeV21InI4FJ1/q UX6wwmcA1nyoQBdheIpeGD3ZYAKzRZhcRpJJaePuHfWbGp+W53oQh2YyIEueK3ZAGEfy WRC69xOgAyoGXK23FOWQN16G3UYnLqb5M1H4t01x5rawaV843i4F7fNw1B7PwLp2XibN rjUzih+DtWmuAPLm2FvzJgwM8mudRlnCP5/ybHjRGVRyOT5e6WahsD9hENHyH3wo6W8c 561Q== X-Gm-Message-State: AOAM5316xYBKRMHb69TdgL1if7npX2KJueElhLTkZQSjpIsWHz+u7Tfx LS2E6p1rXmAjgTNFkRS7RIZwxQ== X-Google-Smtp-Source: ABdhPJxXKjh4+Y0yqeqxJSJMdI5LxN2W4oL2rsmllBC4cnpR8GGbCdPaAXDKugAwhd//EA1cw4x5eA== X-Received: by 2002:a62:3101:0:b029:2de:4f8d:2ca0 with SMTP id x1-20020a6231010000b02902de4f8d2ca0mr7454623pfx.65.1621408797702; Wed, 19 May 2021 00:19:57 -0700 (PDT) Received: from localhost ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id r22sm14267134pgr.1.2021.05.19.00.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 00:19:57 -0700 (PDT) From: Leo Yan <leo.yan@linaro.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, James Clark <james.clark@arm.com>, John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Dave Martin <Dave.Martin@arm.com>, Al Grant <Al.Grant@arm.com>, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v5 3/5] perf arm-spe: Assign kernel time to synthesized event Date: Wed, 19 May 2021 15:19:37 +0800 Message-Id: <20210519071939.1598923-4-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210519071939.1598923-1-leo.yan@linaro.org> References: <20210519071939.1598923-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210519_001958_616355_5898B7CF X-CRM114-Status: GOOD ( 16.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
perf arm-spe: Enable timestamp
|
expand
|
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index ff8b52e6d475..da379328442c 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -234,7 +234,7 @@ static void arm_spe_prep_sample(struct arm_spe *spe, struct arm_spe_record *record = &speq->decoder->record; if (!spe->timeless_decoding) - sample->time = speq->timestamp; + sample->time = tsc_to_perf_time(record->timestamp, &spe->tc); sample->ip = record->from_ip; sample->cpumode = arm_spe_cpumode(spe, sample->ip);
In current code, it assigns the arch timer counter to the synthesized samples Arm SPE trace, thus the samples don't contain the kernel time but only contain the raw counter value. To fix the issue, this patch converts the timer counter to kernel time and assigns it to sample timestamp. Signed-off-by: Leo Yan <leo.yan@linaro.org> --- tools/perf/util/arm-spe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)