From patchwork Wed Feb 6 18:48:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 157665 Delivered-To: patch@linaro.org Received: by 2002:ac9:7558:0:0:0:0:0 with SMTP id r24csp6438308oct; Wed, 6 Feb 2019 10:51:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IYu/lEHFFEh8+aYbm3RaXvIm6pQ/J4Zvr+k1C2jLvfMtBjRlYqtRPAIivfTbi475OG6oKjD X-Received: by 2002:a62:2547:: with SMTP id l68mr11777907pfl.131.1549479096853; Wed, 06 Feb 2019 10:51:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549479096; cv=none; d=google.com; s=arc-20160816; b=ug1/9eK5Im8973rzKnEiV6vwL4L8bU8s+J1jZ0KkCA2fv78oaipXbf2cFLpVbZQguY Ltb+bg4jO7uJsq9iptbSFc/abHLtul1iaGF4mw4E9G5//UZbE8m+QrsKteBeS7lEvIMB FJdQD+RRO3vfcqg0rXR9vKHy2++NPP9xFWgV7JXQ6XRG58i6jYQ9awe20EzXCT+wZE5q Tg/+yexrpZ5+fOdVfTqf6UO+n2X1PvHG8g4ATlR+luL39uupkZOqh4MK80tEOshvrKy1 LRpA7t9JuVs2+CZNytvrschAqMX+Qnu1WvLI8wuHWBfGtpPl7d+I1fTa8ntyj2ExYus0 VIpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rfRDRTD+Psk+r+kvxP7roH3oinNDjOWX5hy+p5BQTqs=; b=j2XDjuCPL/ktmjr3frggyZ40bQn0Bi25wfwpDwfrvefHzbKtQkzhuqM9Z6PsbUiBod Hf3QgdQfmNiNdarCPNwCO5WMjQTKKJWbE5YOOhcruTUX8W0JH6EewW1TfXBwB1JoY8E1 avMsc0r+klrcF/1CQ9O1dwlEVnrHmiOMMxyRxX1YH9SlLurvFZ1ltGAXAL6T7QkaiRnY XK1t36aXDSJ+sQAuZJqeZN+qaPgGGC1SIbk9qXCkqBm2W/aXuIToYL+lTYMt5tSpm+tm rXwE6LY4j5/4vY72WddQAjXgTnV8FrvSu+j0REE1PUW86XVVfpycHcHDNXn5Zf+RUUT0 MKYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=esgS4MTd; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si6827749pla.405.2019.02.06.10.51.36; Wed, 06 Feb 2019 10:51:36 -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=@kernel.org header.s=default header.b=esgS4MTd; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728010AbfBFSve (ORCPT + 31 others); Wed, 6 Feb 2019 13:51:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:45830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727997AbfBFSvb (ORCPT ); Wed, 6 Feb 2019 13:51:31 -0500 Received: from quaco.ghostprotocols.net (unknown [179.97.41.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61112206DD; Wed, 6 Feb 2019 18:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549479090; bh=jTmWGdRh4A7qeDyLncOFpw+Bu1NzoIng5ndfrmuJASI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=esgS4MTdXkKLzBE8CCWDdW04trJLEgPcwRH3IjFy4vrxRuJYEg7EVatzmv7N65nxG u/6zGW/g0HmrOQ+of8Lq7OR7JEZcwLxKM4Rxl6kAzVnMt3Y3KsQFaNLjSmg77TNv1p H7HXHuTwh4IAxPllHivDJsDF63mdJ1JJrRmMNKNY= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Mike Leach , Robert Walker , Suzuki K Poulouse , coresight ml , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo Subject: [PATCH 41/53] perf cs-etm: Add traceID in packet Date: Wed, 6 Feb 2019 15:48:51 -0300 Message-Id: <20190206184903.24054-42-acme@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206184903.24054-1-acme@kernel.org> References: <20190206184903.24054-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan 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 Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: Suzuki K Poulouse Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190129122842.32041-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- 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.20.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; };