Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3507913imm; Sun, 17 Jun 2018 22:13:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI1eZi9QOq1VyLDpI+64OZhIn4aoRp0KREPw3gOqSL9S4LiIggho2Tw8JtVqXRjLs7Xg9mL X-Received: by 2002:a62:3c15:: with SMTP id j21-v6mr11983201pfa.7.1529298814303; Sun, 17 Jun 2018 22:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529298814; cv=none; d=google.com; s=arc-20160816; b=OXri/hOkJPBwi0VSOfAfMrPJZCBQQ7w9XPxaVGkXIzgiU6g4u5JsM0HxpeoDZ+FntT nsQOIsTZyKc+br42z62VW3M94vih9zVPgneay9DjIoTd/OJxNFTxur+Zw6+Hm1h7Qr5K 8y9zF1Ywrw5/U0ezMdRc28AohnldsYecibCDvliXEedfvt9NiQEyj4F1HH1FMxRc8kUd Be0WIEIr5NNg0aw38LywNRJaDZwciInA1jit/9oxJo4SROn/64N0MVlrnj3mp8x3xVb2 c2tKMu+EXyY+Bqk94PEHqDNA4IvAgR06zn8lZsg5n8pnIuAZyJX3fm55x/d42sp/9ESM fBKQ== 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:arc-authentication-results; bh=PTyHBCkH2jOA41M04ze7TFjT8uK1c0mYi0ne/zqeRPI=; b=zmAwgnjCAASNz/mUMfKVbfVvosamF7WlbfY5cfa54GqSWtte47ZXEsvvifzJMep0HC uwBQwsP8ptY/pcm/QmH9g7JQrRz5nstKtY7mX1nL4FOj3hC3pWXPmTh/6ru27B6yF9Zk Xgs8uSoxJWy0YgguVCN2SrLcxiXr2NSKT7wzhulhVPt3hT5tYbFEBT/ZM3ijwbdkleQF 869fGaO9pn2IZz3Dn5qtclmhpxoxSl2XlM6zg8dxM9oOF52OFRkF/eENCHxwNRyDPwho L0NTT3LY5s1DLPu1zH5wDQfaCTNwH1I+v7mrYe3dJG2E+FWREjJcSGOkSdWMX28p6PbF T1aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PxXTeWDY; 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 s6-v6si11055056pgp.603.2018.06.17.22.13.20; Sun, 17 Jun 2018 22:13:34 -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; dkim=pass header.i=@linaro.org header.s=google header.b=PxXTeWDY; 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 S1754544AbeFRFKk (ORCPT + 99 others); Mon, 18 Jun 2018 01:10:40 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:43065 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754288AbeFRFKg (ORCPT ); Mon, 18 Jun 2018 01:10:36 -0400 Received: by mail-pf0-f178.google.com with SMTP id y8-v6so7550208pfm.10 for ; Sun, 17 Jun 2018 22:10:36 -0700 (PDT) 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=PTyHBCkH2jOA41M04ze7TFjT8uK1c0mYi0ne/zqeRPI=; b=PxXTeWDYr/i8hZWOLby54jizoK8xzVqNvY+Ahl2ktjGMpmtH3xyi8R1KVqO2QPaa+Y cDb5w7kjS6KfsHl063PkD4LcgOHzgQ+A99Z1++1xm4BiKIrg1SBxTSUxPt1L2wRuYLUP AcakncmuOycBLX8GalaLQZZKqeSCKgBUFoBPY= 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=PTyHBCkH2jOA41M04ze7TFjT8uK1c0mYi0ne/zqeRPI=; b=lpR+Kas8OK33LGIZZ+eDauavDaqbwNCQ9W1tkyUrEdY9cJvp52r8PYFNXbaXxXL3dN WWumG6LH9+NjxraUs9HOHK2je6wkDf1UX6i7h5H6cqfmJKc9KQdE5S3NLwYIhUT4UVAJ kmFpESyHQw7WLcx529bCKR2ojjtx76A4LQjKtaDxDg1SX22RdJHv/asrpPPdv+G4Xmwi /HX9FbVtk7UiuPW1ycKfJh2r9gzxHrR/IfmE3UvEa6fmiNpoZ6jb8bKO1QXeKN4rBU3f FDxl3XlYgGtwbCbXFWOTY4oRp0leFQywtDP74CYUXeWGlebpER9Nm3NRO5ojt1GrKHs+ kbpA== X-Gm-Message-State: APt69E3wQPe7+PLb63T0w/obn/auurYCq1dnyyXrwhZS1GkvhPDXAcqP j428vnrVkZb5jyqd4mEVg3L1mkSmYts= X-Received: by 2002:a63:2c94:: with SMTP id s142-v6mr9466225pgs.39.1529298636353; Sun, 17 Jun 2018 22:10:36 -0700 (PDT) Received: from localhost.localdomain (li1181-92.members.linode.com. [45.79.82.92]) by smtp.gmail.com with ESMTPSA id l15-v6sm29051710pfg.88.2018.06.17.22.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jun 2018 22:10:35 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mike Leach , Robert Walker , Kim Phillips Cc: Leo Yan Subject: [PATCH v1 1/6] perf cs-etm: Introduce invalid address macro Date: Mon, 18 Jun 2018 13:09:54 +0800 Message-Id: <1529298599-3876-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529298599-3876-1-git-send-email-leo.yan@linaro.org> References: <1529298599-3876-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch introduces invalid address macro and uses it to replace dummy value '0xdeadbeefdeadbeefUL'. Signed-off-by: Leo Yan --- 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 4d5fc37..938def6 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; -- 2.7.4