From patchwork Fri May 24 17:34:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 165147 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3885270ili; Fri, 24 May 2019 10:35:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxza4ijdebuXgFWSiSq2eoC2KlmNW8ovkOs3OnB6Mt7ozPnQRiWZrI9ieemB8SpgKbfTgJn X-Received: by 2002:aa7:8683:: with SMTP id d3mr68615675pfo.145.1558719324829; Fri, 24 May 2019 10:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558719324; cv=none; d=google.com; s=arc-20160816; b=tZ20i9IrRpcgXEB8Gs74X2zFBuwQaQqJ4MAf/O1pN5H+DFMTVWxD7nLFS8H6FE8hjh L3rGSOx6Q7hxFpF3oRRcNyQrEFDIUamd2QpA+mZioboWs5DF570bbsfZ24r7PscAiOMk vnd24AHRbLeqEN8oWU6TlURtI9as9SbweCOsdeueJnZJI3/AH0OgwDQdC94Dww2OaDUB nyul7JZ7rw4L4H0ppqcFCasZLW5odp63KJ5rfP/IjTtR2eFYznQyGqTVGrMX5Zx6clH7 5X1zJ9u2AZFtk12yxpOym2Kree1t6fnS2Zrl+qg54X1TCgdHa6c/CuPYe2LmJ2+JSXJb WI2Q== 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=7YTfrf6ViED9PHS/WoXTw1GGLuSsLDg5zA9R4pOhAT0=; b=gp5VM0Riz4LiafKj/NL8H9a9E8O3tbyZsImPAzW6fqpukYpvTVG6uHSCTejRnrCHa0 jVWTsnzPRT66VIilNv11Mlao705hB66oIFIFie8RSPrAaArmoCn88NIt9c8eOWkAIUXl rsWocQpPToWCZ88oLlUSu7V3tZRGg9gXluY5IWtuuhvShrHTO1ZabjgmHJSdRaT1Pk/7 RjCIyqcXD3aoUbEcwV9CmSvldBz3mFr0dLNPk8Wb3egm4S/Skau304XH91hz9ORV2Jcx lWHYH2z+75B5Bb0mUJS763vtw/IO+ykNhQsYBJVPCjH/r0+3PCp5uYXeo1TwVSBZylBa nt9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m9E8LQQ0; 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 f17si5078321pgv.338.2019.05.24.10.35.24; Fri, 24 May 2019 10:35:24 -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=m9E8LQQ0; 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 S2391707AbfEXRfX (ORCPT + 30 others); Fri, 24 May 2019 13:35:23 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39119 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391665AbfEXRfV (ORCPT ); Fri, 24 May 2019 13:35:21 -0400 Received: by mail-pf1-f194.google.com with SMTP id z26so5725610pfg.6 for ; Fri, 24 May 2019 10:35:20 -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=7YTfrf6ViED9PHS/WoXTw1GGLuSsLDg5zA9R4pOhAT0=; b=m9E8LQQ0ybYokosZ3FSWl1NYHaoqKBGO55JdtR6b2j3oJPAh2zWI/+9SV+B04nUOmw uFYT4ipZZ6J4Rm3Vly6dQxTffTpuUeitYvmKsjHeXGqajJvyeQTRtmo9IssPppm6kxrR JQ951ByVITyZUq/x2q6BWNBukN9XTjUCFiA2pr/+KbWsZ3p5qQK2f4resF+5uEN1ASS+ Txv8DMke5Wiio4bPoYD5syR2CWeEX2VvAKnVQOu9ATh7KZNnoigkP20IU//nVD76sQ0I vg1txyvZrw4Zsl9BiwrFWCTi+w2yJx4fzmllJiZBakHyC+XFLlD3UiqBARB2cN3T+bQS RvLg== 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=7YTfrf6ViED9PHS/WoXTw1GGLuSsLDg5zA9R4pOhAT0=; b=CY1z9Szu9mqtCDmTFFQjdDiSBsz29wpNSVKNyS+yxrJ2K4ZAQhJfiuC/zTsh93Kak6 bDjhFNDtPktBdp8EOQjOVEojyBvcMoDQZ+mTJsjTwr6cEBBLUYTs+nWteYMYgCm/KNng gF9/K5wDQ2Ch/hLzrYxudlavsPivLjDqEQqU6u5WKtXhgTMAd4XNiBPHaC9QLeYIxPsK uaKSyH9GQE/tbCE4u8SfYOCYaGweUoUi9XrFft/XJDWK3Iiv5SLrnh5ige8tvaP4RKy7 sWae09DqjKUzLFqEHbg7w94V6MLwzsnrjRGGiygwPPiGOOo2fm6AsoDXzyX9XLjTNUjj SLZg== X-Gm-Message-State: APjAAAVs3hXzk4NHYTuwZ0JJNJlKbsDWtQyOwi8IvFgXU2eb80J5BhWA yB4XoeEKc8W1TjZ2ISguAF4Y0Q== X-Received: by 2002:a17:90a:1a84:: with SMTP id p4mr11101867pjp.15.1558719320267; Fri, 24 May 2019 10:35:20 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k13sm2809575pgr.90.2019.05.24.10.35.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:35:19 -0700 (PDT) From: Mathieu Poirier To: acme@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, suzuki.poulose@arm.com, leo.yan@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: [PATCH v2 08/17] perf tools: Fix indentation in function cs_etm__process_decoder_queue() Date: Fri, 24 May 2019 11:34:59 -0600 Message-Id: <20190524173508.29044-9-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190524173508.29044-1-mathieu.poirier@linaro.org> References: <20190524173508.29044-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixing wrong indentation of the while() loop - no change of functionality. Fixes: 3fa0e83e2948 ("perf cs-etm: Modularize main packet processing loop") Signed-off-by: Mathieu Poirier --- tools/perf/util/cs-etm.c | 108 +++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 54 deletions(-) -- 2.17.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; }