From patchwork Tue Jan 29 12:28:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 156982 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4603351jaa; Tue, 29 Jan 2019 04:30:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CqNuOKY0qAaG2a3XZ6J/wIUW71Pz2BnHmQ96VUI2t/7AyV36c4ZdfJTjovb8fjy0vY1uh X-Received: by 2002:a17:902:a6:: with SMTP id a35mr25847098pla.201.1548765022662; Tue, 29 Jan 2019 04:30:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548765022; cv=none; d=google.com; s=arc-20160816; b=TiPKKadpooZHenEI8pdvgkdQb2MfLSTjBEzbG5ctCXNo/LURE1PLlstQJiMC40Lg0T DYfmUldCZUbdJAMhFcHTSYraNruCfk8isVWR/ciAS/pWV0xDDlYC6vq/DL5H3Eh3Nn0t 1aNlbDosAD+BiqdW3JLiycn0iW8I+0DH/iL1R4NFqLRTfKcM1UyD0sfk02UL5F5yZz1q r3tus8TTqzirv7U71JuYsCFpX7SeUs/0hUHEtIxT2+0fkHYoQj5Kz5wneGzRAAeismWv /mHpnccqKIoUfTWurM1oom8S7bkkXIJITvJv3tWsEH2Lj/ZY9/upJRVWINaWr/weHdqf 6wCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=LDRQG3UQxntyoi7kv39dKKGog1UFkbBd0dWoL+G3ZRM=; b=0RQYYGZCy6UtsBEHmAHfzdSmv3d2ywXQj0DVsE82ydJvW0Tsh+wg4JljbkadDlvBa1 QXJ2FVDNI0FL9tVJPNF6ddLC30b2SzV+tv1XerBR1R8zAM9Q9txRTEBvLaHHXNakQKwu 9exJZ7gZnDEZpREc0i1wqGGC+mzKZvHEkvdQbpAyLo5OmPMoWNMJZkerjV+b9cJCTXwE gDlKXZqpl6AiJcJYxepBZ1Duw994vlDaX+VpchR9bSngqzexw0rBwz23AuX5PoPmONa7 rrzzduD4btVbNrZxWhFvUiEVRFfF18WB3+UyLpRAsZfHd/YtCkZgBXyksDXWZq3dFUmy P4IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eHGHp8jR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si36008540plv.258.2019.01.29.04.30.22; Tue, 29 Jan 2019 04:30:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eHGHp8jR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729036AbfA2MaV (ORCPT + 31 others); Tue, 29 Jan 2019 07:30:21 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42256 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728498AbfA2MaP (ORCPT ); Tue, 29 Jan 2019 07:30:15 -0500 Received: by mail-pf1-f196.google.com with SMTP id 64so9579483pfr.9 for ; Tue, 29 Jan 2019 04:30:15 -0800 (PST) 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; bh=LDRQG3UQxntyoi7kv39dKKGog1UFkbBd0dWoL+G3ZRM=; b=eHGHp8jRAaV2wgbhIwcjRebSMqSMyg5DgX3bonjkii4dOULdoXvKBmMVhWht8D7sm5 kFHsfDvgvkrWZUb7WHcFWcjsyo89XO3owhDeFlz/exocxsTJdIjmuFp9/Q1/d9G1TGKr Ktft7EuXXzo0VnJKyRvEc7MgaPw+sYIeLkHLM= 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; bh=LDRQG3UQxntyoi7kv39dKKGog1UFkbBd0dWoL+G3ZRM=; b=pSn+aJYRlHj+T8A4K+Ge82cjoREG/26M+nhTlzFr+6I4uWSdavbB+QEilheUEEBl7p XpVktydd48ZiHcVcr9FIrAjl4usW94rBfyy9gwT1tqgjzwHa/wc5rD/I2Hi6/QMTL7YX vee8dl1T3JYaIEWjwZejUT8JtcWbj8G1OXqY7JUPnZpGRMM/tiHJzIllmdpvA2XQTikX mveqRgqw/4MlDKR2glav85Bzs/y9jw51BdAHBCsNbgyiVQPbb8FiUHTMuP9YG7NyyOsi cOjLXQqb6zpLDQ1hoiqyHidzS3M9B/CpC9JkMqtxw5BZd2+aum6YR5PFYKSvM+wQN1/q nO7A== X-Gm-Message-State: AJcUukfBPppbCxDLPMAKww7O/DQNVWjmaY5Xwek0enRR7CU4/cWhnuse +4j80CZq79E5PxxRAALTFQamzA== X-Received: by 2002:a63:6bc1:: with SMTP id g184mr23992275pgc.25.1548765015042; Tue, 29 Jan 2019 04:30:15 -0800 (PST) Received: from localhost.localdomain (li569-141.members.linode.com. [192.155.82.141]) by smtp.gmail.com with ESMTPSA id h64sm59552502pfc.142.2019.01.29.04.30.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 04:30:14 -0800 (PST) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Mike Leach , Robert Walker , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Coresight ML Cc: Leo Yan Subject: [PATCH v7 6/8] perf cs-etm: Add traceID in packet Date: Tue, 29 Jan 2019 20:28:40 +0800 Message-Id: <20190129122842.32041-7-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190129122842.32041-1-leo.yan@linaro.org> References: <20190129122842.32041-1-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add traceID in packet, thus we can use traceID to retrieve metadata pointer from traceID-metadata tuple. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 ++ tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 + 2 files changed, 3 insertions(+) -- 2.17.1 diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c index cdd38ffd10d2..ba4c623cd8de 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -295,6 +295,7 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder) decoder->packet_buffer[i].last_instr_cond = 0; decoder->packet_buffer[i].flags = 0; decoder->packet_buffer[i].exception_number = UINT32_MAX; + decoder->packet_buffer[i].trace_chan_id = UINT8_MAX; decoder->packet_buffer[i].cpu = INT_MIN; } } @@ -331,6 +332,7 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder, decoder->packet_buffer[et].last_instr_cond = 0; decoder->packet_buffer[et].flags = 0; decoder->packet_buffer[et].exception_number = UINT32_MAX; + decoder->packet_buffer[et].trace_chan_id = trace_chan_id; if (decoder->packet_count == MAX_BUFFER - 1) return OCSD_RESP_WAIT; diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h index 012b4728a46f..7e6a8850be4a 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -50,6 +50,7 @@ struct cs_etm_packet { u8 last_instr_cond; u8 last_instr_taken_branch; u8 last_instr_size; + u8 trace_chan_id; int cpu; };