[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ9a7VjNpfbMCJppfD=hy=0dBrMpWcZ=gfKH0PQ8-mR8yUAjPQ@mail.gmail.com>
Date: Thu, 6 Oct 2022 14:22:38 +0100
From: Mike Leach <mike.leach@...aro.org>
To: Suzuki K Poulose <suzuki.poulose@....com>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, mathieu.poirier@...aro.org,
peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
linux-perf-users@...r.kernel.org, leo.yan@...aro.org,
quic_jinlmao@...cinc.com
Subject: Re: [PATCH v3 13/13] coresight: trace-id: Add debug & test macros to
Trace ID allocation
On Mon, 3 Oct 2022 at 12:06, Suzuki K Poulose <suzuki.poulose@....com> wrote:
>
> 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 <mike.leach@...aro.org>
> > ---
> > .../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
In short, yes!
Mike
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
Powered by blists - more mailing lists