From patchwork Sat Jan 19 01:43:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 156114 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3903646jaa; Fri, 18 Jan 2019 17:44:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN7n/coE8IZawO7mrOqQXeauS4JlxnnbwlRucFlaW4a1FT6ucDOxtROtMu/iwUSHAIaxLGLq X-Received: by 2002:a63:82c6:: with SMTP id w189mr20205480pgd.344.1547862275728; Fri, 18 Jan 2019 17:44:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547862275; cv=none; d=google.com; s=arc-20160816; b=OTUaWLyDUSEDLk7Pkb7dLMoKuRdVZ1aUTcYoLKGsLkMIMOwOgn0Wk7tPJtantlNnFf Vw2sZlk+eUuqpXaDDYVRb/qUQNCXJCwr5iINc01HN+aFR9MB8LNipQuS5k+kzZ+MF7so ewqRivPQgkxdSNqys2gb/rI/Zp84QUAbdi848EQ3rTOx6irRvpOSwhgoZyBMfq7DNOQ4 w/kY0TosfzVOCWfvZ4xTyNkJb08WHCImlAGiaW+bTSJ452TUWMIg6nmsQ+8I+gUgJXmi DcQO69Hq4Qki3irNbHsBYXAXzkgIcsWkrwOTmENLzDBWZEObOtVZKojkUuWbHQ3gG4Ug jnMw== 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=7CGHnFgA52zKXZDyd8sb3sbv9trI6e0tJf8G4Od6mhA=; b=OX+8jk3i8dPvdW5oybQZx5u9ZtV9HkfQ/LHVL9yKn1YOrHDp0yV8GJygxhRsRGI5k8 hy+NJKBJsePTZLtxifHMqAn8duWf5stqU1x5ZVfdmp1IUe9WbpgR9rTR9aXkqV4z5DDf TZAKklg+xWPIb6/V1eHOssbfPIpGw/tAAln3cVpcS+MNWAhKEKfl/RQay8sJlnL842ho GooESArv47xOI9cEQQlQjl1a851LZtQzB6PZ2Qsg5aOpRJt/S/6eNuHQeDlK5odp594v K647uXEtg7csT9aLUfLX8ejMA/SKbqcSUsrsD0x4Cv9iXaXO3NCjtMwYLfRquLMFsBPQ BF1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WMYRDZcJ; 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 z5si6306664pgj.177.2019.01.18.17.44.35; Fri, 18 Jan 2019 17:44:35 -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=WMYRDZcJ; 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 S1730381AbfASBoc (ORCPT + 24 others); Fri, 18 Jan 2019 20:44:32 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43365 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730353AbfASBo2 (ORCPT ); Fri, 18 Jan 2019 20:44:28 -0500 Received: by mail-pg1-f193.google.com with SMTP id v28so6856583pgk.10 for ; Fri, 18 Jan 2019 17:44:27 -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=7CGHnFgA52zKXZDyd8sb3sbv9trI6e0tJf8G4Od6mhA=; b=WMYRDZcJWZlYjwF1keRnofNHQ/JvhjLXBuV4YJrQeX715ddKNk2tbcOviRlR15l1dQ 0+17juqn231qo7yLpvMLBrExKoWNYpeEb+zrt0VbeW9PuU4S/eHptD0y7nX8eABIPC45 psLPGy9eTt3CpLPyJvCL8/L63pAy9i7YkA3hQ= 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=7CGHnFgA52zKXZDyd8sb3sbv9trI6e0tJf8G4Od6mhA=; b=RjyO8gWSSHxkTlnI0629SdOEjnG5C/akURsFPIv9yBkmcIaoYO8yGXDVrfgNLv0Ahs LhyxdnOD44Z3jS+9mTLfuz8Mv0alzPlrCO0HnSlolgUycwYovbY8ZcK/Ra+MlqlIPDCy TmLEaxmf7+snKMrdz0+FVjINT2DFVcPTETsLXLpf0gQtIwJOZttOuhKMh8T8KjzZ8dzG xj8SpDFTYRQ7t8y1ew1gpZIuxoU6OJJ4IkDQVdKucAk9L4wYH6JjDW+86oSE6ENVLaly vsoWJWD1rptAGPbCG0+pqXGXe00XU2HxAaZf91A6d/Plq/P4Qp8FhOWXah4shytCVnWL PJIg== X-Gm-Message-State: AJcUukdlHMyU9qNu5UqsmRxdvyu/WLzOBO+/6mDI8aKtNffU2Y8Td5Hj 6BwNMcwTkLdkF9hb86V/+Fdwow== X-Received: by 2002:a65:4646:: with SMTP id k6mr15151021pgr.153.1547862267613; Fri, 18 Jan 2019 17:44:27 -0800 (PST) Received: from localhost.localdomain (li421-24.members.linode.com. [50.116.3.24]) by smtp.gmail.com with ESMTPSA id d21sm8648436pfo.162.2019.01.18.17.44.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 17:44:27 -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 v6 6/8] perf cs-etm: Add traceID in packet Date: Sat, 19 Jan 2019 09:43:45 +0800 Message-Id: <20190119014347.27441-7-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190119014347.27441-1-leo.yan@linaro.org> References: <20190119014347.27441-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 --- 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 Reviewed-by: Mathieu Poirier 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; };