lkml.org 
[lkml]   [2022]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 13/13] coresight: trace-id: Add debug & test macros to Trace ID allocation
From
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@linaro.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

\
 
 \ /
  Last update: 2022-10-03 13:07    [W:0.148 / U:3.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site