Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2679901rwb; Mon, 3 Oct 2022 04:16:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7k7xjLXGgYZMoLw1BWOpXou+6QoHlVmgGmBQ4coIAC+X23KMKDNvag3GgpwpicIRbzCrQo X-Received: by 2002:a17:907:72ca:b0:787:95cf:8263 with SMTP id du10-20020a17090772ca00b0078795cf8263mr14901583ejc.164.1664795789548; Mon, 03 Oct 2022 04:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664795789; cv=none; d=google.com; s=arc-20160816; b=a2iu5Lr4JZ3/jrjA7Xpa2Z04btI5uLjj6BhBKmM4w7FDoFHXTveiFxXc/5b9/W7m7I 0pJbcA0qy3CG6MqMb/UsKgJGOj97mMrWnMVwuzNHFV7QqC33jbeULp31+30DcWhfoG1s TSOoRu9YG0huzsJOCRMAg4CvhTHrcP1msqKdyhnpQnivjpfPvB86lGpWfJPsCqs2frcJ TYH5+5PBXpHtrXoBFURewZOSfM/ZwRnnNCZ/SqJMzrkGg/i84c/UvNFSoZefv7+Ve6Be 4qo2k2SR1Rd/Kx/83SRoYqihTlHxtnZzSDYJridwLmIbtSkas047lXTGJ5eK6U7MEIp9 PQrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=k1IFUOHSYBg5qx5e1u3F7PQXxhIod9fezv/Jp5BGSHc=; b=qZmPYooas8349kpxq1m5oViit49we+4VJNhx5+/SI8m87FXRy6t9S8GirlxHnRvCxi IXCKFANihQMtaA/tCSjq5VGIK/z5uAUNvizZtJweWQJ2zZstDH5Pkgpv+4QmalR7Z24t mhAlm7SWcr2dqOSiKQBmwoexn4VTxHjRuPaH1f2VVwr5jXtCiNP7wWkAgizmUOEiHw6g hVFJxI4NwOpQ7M8c+yzI0z/YTeKxDxl2JfaBWW9i0KNyMqdrZAEr+NV/RuEZ4IgDeAOJ iZ1ji2uGxvIdIb4PHJBMpkMJCxOFTL66n5Z2xwVGSXziuw01XQ0BAJt9a3SaKk8815iK H4Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg10-20020a170907970a00b00782393c36cfsi7341921ejc.336.2022.10.03.04.15.56; Mon, 03 Oct 2022 04:16:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbiJCLG4 (ORCPT + 99 others); Mon, 3 Oct 2022 07:06:56 -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 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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