Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1214161imm; Wed, 25 Jul 2018 13:42:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcJOpyS9Hjif7sd0vjlOcsOEy0l6qgBjMCuPo/cRvNtMh6ltexN/X5yzWYD26VjrshLKLBa X-Received: by 2002:a62:1f06:: with SMTP id f6-v6mr23739000pff.140.1532551378651; Wed, 25 Jul 2018 13:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532551378; cv=none; d=google.com; s=arc-20160816; b=nIgifcjYUITWmRUJhcs7wGmi9GyIyie+dStjh1nln/y/YJHj93sVHLPZ+UZpF+u6JQ 4vBge1n4PtwLPKbZeGf5t46Xv8bUxDZ5vwzAx+maDFCqqhDvrJ6eFcK1taQwDupClAgs SPoOwrwoNy4hkCKvWVjir0dPjjXf6hrK9XnZeVYZNo6P+NiuHWz1xFPl46e2mUaWOiug TvtDAj+O3pqA67bhIgCO47UeDrPABlACI+Bn/JeDQLXLWXlU/VmZ5ewZvPwyuQlx4FXf AoTqsIE84NlxDI8cV21525ULH6zjaYLMsQLydrXPSUD0/XUE2H8+J6t6f9SlPC02Gpnk ghPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=5mFeVNyesB+1WtDTs7Jx7r8gXbg+O4iUJIXLkfvuNZU=; b=DIRHK3Cwo3hn6wWiUHrqr23xVRn/kOQx2RJMn+GBBqqJdg3mmI5ARa6VVUG4o/fIv/ 6aB4/0MmTuUqNdB8KhmBjFLktxAhgNJK9d5M4BDP0OQeYFQJPcs3lZyjq8DFhJGUz9rZ 0hNR2mWASmZznHvWo2SlNd+YbHkMvQk0LwxK7wH2MyulphTZx3kMezzT/b8hFTEFmMTF DSZPiu5OuAm0u+KJikCbTxD390n4EC6K19h/kj++WxSE7OUOCYR7JSR/5fj2J0Y0yMuD A4l4JOzW9p5S3isDkQ6dD4W8or/BJZRcJred1ZL8P6taGUz4lGILUIsT/P3MFq73Z2lZ 0FLg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y126-v6si14252561pgb.23.2018.07.25.13.42.42; Wed, 25 Jul 2018 13:42:58 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731360AbeGYVyn (ORCPT + 99 others); Wed, 25 Jul 2018 17:54:43 -0400 Received: from terminus.zytor.com ([198.137.202.136]:44093 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730337AbeGYVyn (ORCPT ); Wed, 25 Jul 2018 17:54:43 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6PKewOU498516 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Jul 2018 13:40:58 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6PKev3R498513; Wed, 25 Jul 2018 13:40:57 -0700 Date: Wed, 25 Jul 2018 13:40:57 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Leo Yan Message-ID: Cc: jolsa@redhat.com, linux-kernel@vger.kernel.org, robert.walker@arm.com, namhyung@kernel.org, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com, mathieu.poirier@linaro.org, mike.leach@linaro.org, acme@redhat.com, kim.phillips@arm.com, mingo@kernel.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com Reply-To: namhyung@kernel.org, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, robert.walker@arm.com, mike.leach@linaro.org, acme@redhat.com, mingo@kernel.org, kim.phillips@arm.com, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, mathieu.poirier@linaro.org In-Reply-To: <1529298599-3876-2-git-send-email-leo.yan@linaro.org> References: <1529298599-3876-2-git-send-email-leo.yan@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf cs-etm: Introduce invalid address macro Git-Commit-ID: 6abf0f451087176caf0f9ad0cc2a79bcc5ebb443 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6abf0f451087176caf0f9ad0cc2a79bcc5ebb443 Gitweb: https://git.kernel.org/tip/6abf0f451087176caf0f9ad0cc2a79bcc5ebb443 Author: Leo Yan AuthorDate: Mon, 18 Jun 2018 13:09:54 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 24 Jul 2018 14:48:22 -0300 perf cs-etm: Introduce invalid address macro This patch introduces invalid address macro and uses it to replace dummy value '0xdeadbeefdeadbeefUL'. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kim Phillips Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Robert Walker Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1529298599-3876-2-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 4d5fc374e730..938def6d0bb9 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -31,6 +31,8 @@ #endif #endif +#define CS_ETM_INVAL_ADDR 0xdeadbeefdeadbeefUL + struct cs_etm_decoder { void *data; void (*packet_printer)(const char *msg); @@ -261,8 +263,8 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder) decoder->tail = 0; decoder->packet_count = 0; for (i = 0; i < MAX_BUFFER; i++) { - decoder->packet_buffer[i].start_addr = 0xdeadbeefdeadbeefUL; - decoder->packet_buffer[i].end_addr = 0xdeadbeefdeadbeefUL; + decoder->packet_buffer[i].start_addr = CS_ETM_INVAL_ADDR; + decoder->packet_buffer[i].end_addr = CS_ETM_INVAL_ADDR; decoder->packet_buffer[i].last_instr_taken_branch = false; decoder->packet_buffer[i].exc = false; decoder->packet_buffer[i].exc_ret = false; @@ -295,8 +297,8 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder, decoder->packet_buffer[et].exc = false; decoder->packet_buffer[et].exc_ret = false; decoder->packet_buffer[et].cpu = *((int *)inode->priv); - decoder->packet_buffer[et].start_addr = 0xdeadbeefdeadbeefUL; - decoder->packet_buffer[et].end_addr = 0xdeadbeefdeadbeefUL; + decoder->packet_buffer[et].start_addr = CS_ETM_INVAL_ADDR; + decoder->packet_buffer[et].end_addr = CS_ETM_INVAL_ADDR; if (decoder->packet_count == MAX_BUFFER - 1) return OCSD_RESP_WAIT;