From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A827C433FE for ; Mon, 3 Oct 2022 11:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbiJCLGz (ORCPT ); Mon, 3 Oct 2022 07:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbiJCLGy (ORCPT ); Mon, 3 Oct 2022 07:06:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B44AC402C9; Mon, 3 Oct 2022 04:06:52 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BAD313D5; Mon, 3 Oct 2022 04:06:59 -0700 (PDT) Received: from [10.57.65.226] (unknown [10.57.65.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AEEF23F792; Mon, 3 Oct 2022 04:06:50 -0700 (PDT) Message-ID: <231e1e51-ab6c-2084-bb97-0594eb5fcbad@arm.com> Date: Mon, 3 Oct 2022 12:06:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v3 13/13] coresight: trace-id: Add debug & test macros to Trace ID allocation To: Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, quic_jinlmao@quicinc.com References: <20220809223401.24599-1-mike.leach@linaro.org> <20220809223401.24599-14-mike.leach@linaro.org> From: Suzuki K Poulose In-Reply-To: <20220809223401.24599-14-mike.leach@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 09/08/2022 23:34, Mike Leach wrote: > Adds in a number of pr_debug macros to allow the debugging and test of > the trace ID allocation system. > > Signed-off-by: Mike Leach > --- > .../hwtracing/coresight/coresight-trace-id.c | 36 +++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-trace-id.c b/drivers/hwtracing/coresight/coresight-trace-id.c > index ac9092896dec..24c19ff493a9 100644 > --- a/drivers/hwtracing/coresight/coresight-trace-id.c > +++ b/drivers/hwtracing/coresight/coresight-trace-id.c > @@ -69,6 +69,30 @@ static void coresight_trace_id_set_pend_rel(int id, struct coresight_trace_id_ma > set_bit(id, id_map->pend_rel_ids); > } > > +/* #define TRACE_ID_DEBUG 1 */ > +#ifdef TRACE_ID_DEBUG > +static char page_buf[PAGE_SIZE]; > + > +static void coresight_trace_id_dump_table(struct coresight_trace_id_map *id_map, > + const char *func_name) > +{ > + pr_debug("%s id_map::\n", func_name); > + bitmap_print_to_pagebuf(0, page_buf, id_map->used_ids, CORESIGHT_TRACE_IDS_MAX); > + pr_debug("Avial= %s\n", page_buf); Could we not use %pb directly and skip the bitmap_print_to_pagebuf ? Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34EB8C433FE for ; Mon, 3 Oct 2022 11:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HkHu0x6/r5bLovTbEUzXlLyxuPdw1Cwl0fFIFV85t5o=; b=I/Z2g4RgGuf6qD OjmLrhmZTtj+9OfXu8W54+8L1Ebwv1nRPOofqAoW1EnoLSDfghx7UpzxFpR33MCMiihOockztoCDu JRe7SEaSXp3QOlkAOV9tN9m4RLZIMvc4X5I0M5Fr2W7mA6RkbgS/h4TuIKHQxEbS/L3cjfAR3GzmN NahuCJgkniDsFY6h10jQC/Ntk1EmbMBAKT1p2LXF4mcgHUMCckwodYFsJ58UpLzavsLLxD6IzsasW ThgrkHB4rHvPTUO1oT0PnlNgs5zTON9Q1Iy31bf4w8HJNAWZzURs7Noyd/CSN8Akle7YyBeFaExB8 yqL+ZlWseZoJRk6Y60rA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofJHq-005QcD-Tb; Mon, 03 Oct 2022 11:07:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofJHm-005QaE-5P for linux-arm-kernel@lists.infradead.org; Mon, 03 Oct 2022 11:06:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BAD313D5; Mon, 3 Oct 2022 04:06:59 -0700 (PDT) Received: from [10.57.65.226] (unknown [10.57.65.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AEEF23F792; Mon, 3 Oct 2022 04:06:50 -0700 (PDT) Message-ID: <231e1e51-ab6c-2084-bb97-0594eb5fcbad@arm.com> Date: Mon, 3 Oct 2022 12:06:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v3 13/13] coresight: trace-id: Add debug & test macros to Trace ID allocation To: Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, quic_jinlmao@quicinc.com References: <20220809223401.24599-1-mike.leach@linaro.org> <20220809223401.24599-14-mike.leach@linaro.org> From: Suzuki K Poulose In-Reply-To: <20220809223401.24599-14-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221003_040658_281934_E7DA75F0 X-CRM114-Status: GOOD ( 12.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/08/2022 23:34, Mike Leach wrote: > Adds in a number of pr_debug macros to allow the debugging and test of > the trace ID allocation system. > > Signed-off-by: Mike Leach > --- > .../hwtracing/coresight/coresight-trace-id.c | 36 +++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-trace-id.c b/drivers/hwtracing/coresight/coresight-trace-id.c > index ac9092896dec..24c19ff493a9 100644 > --- a/drivers/hwtracing/coresight/coresight-trace-id.c > +++ b/drivers/hwtracing/coresight/coresight-trace-id.c > @@ -69,6 +69,30 @@ static void coresight_trace_id_set_pend_rel(int id, struct coresight_trace_id_ma > set_bit(id, id_map->pend_rel_ids); > } > > +/* #define TRACE_ID_DEBUG 1 */ > +#ifdef TRACE_ID_DEBUG > +static char page_buf[PAGE_SIZE]; > + > +static void coresight_trace_id_dump_table(struct coresight_trace_id_map *id_map, > + const char *func_name) > +{ > + pr_debug("%s id_map::\n", func_name); > + bitmap_print_to_pagebuf(0, page_buf, id_map->used_ids, CORESIGHT_TRACE_IDS_MAX); > + pr_debug("Avial= %s\n", page_buf); Could we not use %pb directly and skip the bitmap_print_to_pagebuf ? Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel