Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2937652ybi; Mon, 17 Jun 2019 13:06:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpk5D+f3C5/1SGpffof0wjFANTBvrxAIcLhvsynJ9c7seS2c+U1+mozQxYH4piUUfmT2KO X-Received: by 2002:a62:764d:: with SMTP id r74mr94405761pfc.110.1560799550116; Mon, 17 Jun 2019 12:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560799550; cv=none; d=google.com; s=arc-20160816; b=dObQadTzZrqWWPozA/f8a8H6IZ6Ahe6hpLgGTwrP+GZDB6H64hxmmRbr16aumx8NIE WvAERq2cffAP8HyHzwtXyGYFc3+AvM23EDG9Fd7Cj2J1b01EAg82rxFvJt7N1+Yyby45 mfJ6SISW9VVJalIZWpDgCR17VIAZvAVkXFnY++PgT2Yn8HuzIRS7fHowO6ta4uMoB50q sp26N8MoaELnBNHI8W7m4PTci+2HaN0ymgvF3mGsC3AlZJTkLbNYHioLK+Sn8A6JLFhu PyHnaB+bMD06IC5S07W415xZeqqnNOg1GFsCLFbQhrcpxpYMvyBc5tvacvdutyPwL+LE u3Ug== 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:dkim-signature:dkim-filter; bh=Qqc6POFVkKgSQcvgAsB6988pdzLu+HunI2paK+Ed5Fw=; b=I88Ji2fUj57rztFSeUp9YkNdrEG3pWsXmY/3YLiqJ2MuB30BNEDYF7GCu+jbKZjXD2 8RR0JjB4YRwQ1adUJzpuGUX+B5PFQhRr7BH3LFEwAQiFpHuLsMPaPk/uGyXLESEf5fEL TAKWPSd/Ew5fFKjOY1x80L2q8MX5l3pBbUJdIHTCa+YgcrfntUUqrk8TpDyOoMFX3aYn ZV8Jax0v1jsTGaI87AdPiE11aiwH4+uNO8hcUNyEexG9/d0S2GCaANYG/GP5lQjOCiqD jrz++3B+mf3EgVQ5V3T8I9oIvHCPTBZxvx0q+KAPQFapyNB/sN0ZY0CFStxD0njqWQtu 7WDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=ALnGXQyD; 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=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si10835014plc.166.2019.06.17.12.25.35; Mon, 17 Jun 2019 12:25:50 -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=@zytor.com header.s=2019051801 header.b=ALnGXQyD; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbfFQTZZ (ORCPT + 99 others); Mon, 17 Jun 2019 15:25:25 -0400 Received: from terminus.zytor.com ([198.137.202.136]:44633 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbfFQTZZ (ORCPT ); Mon, 17 Jun 2019 15:25:25 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x5HJP3K53563269 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 17 Jun 2019 12:25:03 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x5HJP3K53563269 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1560799504; bh=Qqc6POFVkKgSQcvgAsB6988pdzLu+HunI2paK+Ed5Fw=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=ALnGXQyDb6dJOEWbtCO0ZPKZ1rGFiISvV0cfU0en37288P6JQzl60HFIjMXCEmvnf tdDejAs7tEtdqgg+nyjMEvXTdxkKJS/n6N/gMtv1tUU9G4gU+chxEKkQGERKflmFpT 6kZJQIKuymeG4/4T/9HEpsXhseWYkA9+gpDcMoanNCs5bpKZAR0LJZU4Mvff5M4Cir E0AOHrf+rTXdNWENeUT1pu46795tHX4YvjWHLv8v6FAi+ZWWVsGJywDFFFDUc9axaY 1TMjMPNrgAH6aIv6vWZvi4NCvwXNIMJVBgVp0hATk9o49qeBiox+J6tWtKhIOF+sTV hyjv/D4t40WvA== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x5HJP2HN3563261; Mon, 17 Jun 2019 12:25:02 -0700 Date: Mon, 17 Jun 2019 12:25:02 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Mathieu Poirier Message-ID: Cc: jolsa@redhat.com, mingo@kernel.org, namhyung@kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, acme@redhat.com, leo.yan@linaro.org, suzuki.poulose@arm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, tglx@linutronix.de Reply-To: alexander.shishkin@linux.intel.com, peterz@infradead.org, namhyung@kernel.org, mingo@kernel.org, jolsa@redhat.com, tglx@linutronix.de, mathieu.poirier@linaro.org, leo.yan@linaro.org, suzuki.poulose@arm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, acme@redhat.com In-Reply-To: <20190524173508.29044-9-mathieu.poirier@linaro.org> References: <20190524173508.29044-9-mathieu.poirier@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf cs-etm: Fix indentation in function cs_etm__process_decoder_queue() Git-Commit-ID: 882f4874ad74c528c3437c9c8783310b073323a1 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=-1.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: 882f4874ad74c528c3437c9c8783310b073323a1 Gitweb: https://git.kernel.org/tip/882f4874ad74c528c3437c9c8783310b073323a1 Author: Mathieu Poirier AuthorDate: Fri, 24 May 2019 11:34:59 -0600 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 10 Jun 2019 15:50:02 -0300 perf cs-etm: Fix indentation in function cs_etm__process_decoder_queue() 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(-) 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; }