Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp66094pxy; Fri, 30 Apr 2021 00:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzKjI4whyMS0v3t98n2Koc0EqGyZE0TL6DsThVbG54iYAXv7TWiEtE/GTR9qnqzuP8PN4M X-Received: by 2002:a17:902:da86:b029:ec:ad63:5ab with SMTP id j6-20020a170902da86b02900ecad6305abmr3941606plx.28.1619766242193; Fri, 30 Apr 2021 00:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619766242; cv=none; d=google.com; s=arc-20160816; b=Nv8EdRNv2lVwDKvU+EKeJ1aIBKss2d2lUykBEbr0xI9mlPDYrSK2yqtgaqsKygrgZ4 gAlOXbeGtDlOwk5dwe10Eql3kYZn2FOwhH+L2vbEkONLGZ2QDg6qx4nAfK85yd2HgVwO gI9oxQnaB1cnt5dqovpEz9/zpn7gsyYPD9DE3+enVMnB0yxVZ5WMimAVZQZZ/MthYExk 58414um1uinaO1iuq3PL3QIjbB/ewM7NMkcCKLvcWv4LkanAB+vkJuFchwe3qBssK6ji gTTObXzRDym+oc9lLhwVnIU/68ao+6mVzHqJIC8fR6zwXI2zlxx/GvgEH82/3MFnch6j jw0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:references:in-reply-to:message-id :date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=WJkWNVU9KWqT+3IlaQb85RjM6c+FX/gjmMUEQx7BFAA=; b=LgwN84p2kNO8DMpEKJdxbNE7SI78b6NfWyUKORjDgWdu16f6qXyhkrKhCIo6KZyj/s Oul/J/VHk+2SL4lA9hpxldFIpwHrTjzizcq+wB4qO+Vk5LOZZLR3rteg0CgJ96RMxFLU 9udzEMPdJZgGOSy7iplReo2Zs0EwXD+nMeXPQ/a/psNVnnnrH4l4sSqw/JqulR00z4GP OaNIlWmAaxTpr6Xwsl3+qg8beHmS5+Za7fheL9pI5ckYhG8VVfUL3YCjpLz8fLdLSjAH Di58QkX08gByiax5FGBTjeswNOw6hiypA+RFWHa6mUbVsLAY2eFNzaH7dpXzK470z0Ly E8Xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si2497104pls.131.2021.04.30.00.03.43; Fri, 30 Apr 2021 00:04:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbhD3HDp (ORCPT + 99 others); Fri, 30 Apr 2021 03:03:45 -0400 Received: from mga09.intel.com ([134.134.136.24]:34039 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230433AbhD3HDo (ORCPT ); Fri, 30 Apr 2021 03:03:44 -0400 IronPort-SDR: VuSFh6vx3UzbOUg9bF1ewV2NP0WOq2oSP1gHzEWm64CXdk3L8nYYh6ouH4H3zCFvWA2LADLfmO /GRm5A4r7Z0g== X-IronPort-AV: E=McAfee;i="6200,9189,9969"; a="197312421" X-IronPort-AV: E=Sophos;i="5.82,260,1613462400"; d="scan'208";a="197312421" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 00:02:57 -0700 IronPort-SDR: lspXuqoeCvXw+M5yVjfTLH1zkXkq4S4BsyJLM2yhJnj7/ycGJj22Haz2LJVb6vykBkis3TY5XR bSELufjKkPuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,260,1613462400"; d="scan'208";a="404492263" Received: from ahunter-desktop.fi.intel.com ([10.237.72.174]) by orsmga002.jf.intel.com with ESMTP; 30 Apr 2021 00:02:55 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo , Jiri Olsa , Andi Kleen Cc: linux-kernel@vger.kernel.org Subject: [PATCH V2 03/12] perf intel-pt: Support Z itrace option for timeless decoding Date: Fri, 30 Apr 2021 10:03:00 +0300 Message-Id: <20210430070309.17624-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210430070309.17624-1-adrian.hunter@intel.com> References: <20210430070309.17624-1-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Correlating virtual machine TSC packets is not supported at present, so instead support the Z itrace option. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-intel-pt.txt | 5 +++++ tools/perf/util/intel-pt.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt index 1dcec73c910c..33df7898c378 100644 --- a/tools/perf/Documentation/perf-intel-pt.txt +++ b/tools/perf/Documentation/perf-intel-pt.txt @@ -869,6 +869,7 @@ The letters are: L synthesize last branch entries on existing event records s skip initial number of events q quicker (less detailed) decoding + Z prefer to ignore timestamps (so-called "timeless" decoding) "Instructions" events look like they were recorded by "perf record -e instructions". @@ -1062,6 +1063,10 @@ What *will* be decoded with the qq option: - instruction pointer associated with PSB packets +The Z option is equivalent to having recorded a trace without TSC +(i.e. config term tsc=0). It can be useful to avoid timestamp issues when +decoding a trace of a virtual machine. + dump option ~~~~~~~~~~~ diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index eef8970d98fe..7bee969eb335 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -899,7 +899,7 @@ static bool intel_pt_timeless_decoding(struct intel_pt *pt) bool timeless_decoding = true; u64 config; - if (!pt->tsc_bit || !pt->cap_user_time_zero) + if (!pt->tsc_bit || !pt->cap_user_time_zero || pt->synth_opts.timeless_decoding) return true; evlist__for_each_entry(pt->session->evlist, evsel) { -- 2.25.1