From patchwork Tue Jun 11 18:58:30 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: 166480 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2722606ilk; Tue, 11 Jun 2019 12:02:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE5ygs0wUKsgAc/1yunwxtSxAVJTYWlI9ePuLp68o0Jbu3izb/pHeHTR05dDqRQrUYyXCD X-Received: by 2002:a63:5f0d:: with SMTP id t13mr15143495pgb.358.1560279764843; Tue, 11 Jun 2019 12:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560279764; cv=none; d=google.com; s=arc-20160816; b=gtYvkL5QMfJbs13qPHfBMJOE4cvJMBPK/n2a8jJufZY7IRcC8p+RVGdiJZMGs0nH7G bHlLq5Sqt9/2s4IueMutYqBsJzPyVPTO+zdqYBQ07UZ2dUvFoOtU3UmyhWf+opuMdcGZ TDcy3DnhB/wk3Q0Lau6xi6VLKbXyAMVTLaDu50/D6XKKupzCVXuky8rRv6FMZigxRKfv 4E8K/Y5mzimjlsXUDZLjtJ7NPoGEpV7WQlplf220x9rW9ZQ9/qXj9ci6qHgEuMlJIRlH e4acX961G4o8ckiRozTh/E/QOiLxBGkOpf1U8pXGUnEJvo6WllaNpWE431DGaf1jUS+G RP0g== 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=kOJwVAnCVe8YHbk9dTRPhbmwnHvLwMt3UA6d9znEHQI=; b=qf412LtHGy71GGiKvk6zsknc92dkgvWfqW+V4gwYLk4XyoL/7bGf/KKCBicpi8J1Xg OYpE5xUloXhC42JRsXGF6uWB73IYWLyg+LH9FrOrk6Aw35tmISHJIU6TggRwE++mEaLN qUin8m1DTeXSkZrsEwN9cMqE7Me4ggVQyfP2tEZa3vy2SIHA3IqCBoHA7ZjpvVw1HSP0 intC9hrRkF12EwrPEuwy+oRX3qwVkXxaDwPwxZJDS5mJaXmQZMlq2yk4QSeCrmllz4je iBT3GTRfX5RVzFdxSw7eJaA0ljQ0xUGzZwICAE2ScIZrSakrlA5hYJ7k8EmgTjYprGYj AaFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D3kkv7c/"; 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 m1si13381094pld.236.2019.06.11.12.02.43; Tue, 11 Jun 2019 12:02:44 -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=@kernel.org header.s=default header.b="D3kkv7c/"; 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 S2392389AbfFKTCn (ORCPT + 30 others); Tue, 11 Jun 2019 15:02:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:38838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389575AbfFKTCl (ORCPT ); Tue, 11 Jun 2019 15:02:41 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.11]) (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 ED1DA21850; Tue, 11 Jun 2019 19:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560279760; bh=0sTyWYXn4Pa+7X/55tb8NqyfN58bpln0gSI0xoGG/YA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3kkv7c/rcygY4/5x0moLRw4ywftF8NOptTWJjwnL/3y4jUJg8J1HtL5SBU2R4Jzh wyblfBzVxm8D0NRQ2CXrBb74c35E+pbC6zgZBXsi0BxLTxiToO04qJVlTLs2zdTBus iqaxQnkWhwmHocmmkxG0JgsvfVHulkfPub56qegI= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Mathieu Poirier , Leo Yan , Alexander Shishkin , Jiri Olsa , Peter Zijlstra , Suzuki Poulouse , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo Subject: [PATCH 44/85] perf cs-etm: Fix indentation in function cs_etm__process_decoder_queue() Date: Tue, 11 Jun 2019 15:58:30 -0300 Message-Id: <20190611185911.11645-45-acme@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190611185911.11645-1-acme@kernel.org> References: <20190611185911.11645-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: Mathieu Poirier Fixing wrong indentation of the while() loop - no change of functionality. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Fixes: 3fa0e83e2948 ("perf cs-etm: Modularize main packet processing loop") Link: http://lkml.kernel.org/r/20190524173508.29044-9-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm.c | 108 +++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 54 deletions(-) -- 2.20.1 diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index a74c53a45839..68fec6f019fe 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -1578,64 +1578,64 @@ static int cs_etm__process_decoder_queue(struct cs_etm_queue *etmq) packet_queue = cs_etm__etmq_get_packet_queue(etmq); - /* Process each packet in this chunk */ - while (1) { - ret = cs_etm_decoder__get_packet(packet_queue, - etmq->packet); - if (ret <= 0) - /* - * Stop processing this chunk on - * end of data or error - */ - break; + /* Process each packet in this chunk */ + while (1) { + ret = cs_etm_decoder__get_packet(packet_queue, + etmq->packet); + if (ret <= 0) + /* + * Stop processing this chunk on + * end of data or error + */ + break; + + /* + * Since packet addresses are swapped in packet + * handling within below switch() statements, + * thus setting sample flags must be called + * prior to switch() statement to use address + * information before packets swapping. + */ + ret = cs_etm__set_sample_flags(etmq); + if (ret < 0) + break; + switch (etmq->packet->sample_type) { + case CS_ETM_RANGE: /* - * Since packet addresses are swapped in packet - * handling within below switch() statements, - * thus setting sample flags must be called - * prior to switch() statement to use address - * information before packets swapping. + * If the packet contains an instruction + * range, generate instruction sequence + * events. */ - ret = cs_etm__set_sample_flags(etmq); - if (ret < 0) - break; - - switch (etmq->packet->sample_type) { - case CS_ETM_RANGE: - /* - * If the packet contains an instruction - * range, generate instruction sequence - * events. - */ - cs_etm__sample(etmq); - break; - case CS_ETM_EXCEPTION: - case CS_ETM_EXCEPTION_RET: - /* - * If the exception packet is coming, - * make sure the previous instruction - * range packet to be handled properly. - */ - cs_etm__exception(etmq); - break; - case CS_ETM_DISCONTINUITY: - /* - * Discontinuity in trace, flush - * previous branch stack - */ - cs_etm__flush(etmq); - break; - case CS_ETM_EMPTY: - /* - * Should not receive empty packet, - * report error. - */ - pr_err("CS ETM Trace: empty packet\n"); - return -EINVAL; - default: - break; - } + cs_etm__sample(etmq); + break; + case CS_ETM_EXCEPTION: + case CS_ETM_EXCEPTION_RET: + /* + * If the exception packet is coming, + * make sure the previous instruction + * range packet to be handled properly. + */ + cs_etm__exception(etmq); + break; + case CS_ETM_DISCONTINUITY: + /* + * Discontinuity in trace, flush + * previous branch stack + */ + cs_etm__flush(etmq); + break; + case CS_ETM_EMPTY: + /* + * Should not receive empty packet, + * report error. + */ + pr_err("CS ETM Trace: empty packet\n"); + return -EINVAL; + default: + break; } + } return ret; }