lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/4] perf expr: Add debug logging for literals
From
Date

> }
> - if (!strcmp("#num_packages", literal))
> - return topology->package_cpus_lists;
> - if (!strcmp("#num_dies", literal))
> - return topology->die_cpus_lists;
> - if (!strcmp("#num_cores", literal))
> - return topology->core_cpus_lists;
> + if (!strcmp("#num_packages", literal)) {
> + result = topology->package_cpus_lists;
> + goto out;
> + }
> + if (!strcmp("#num_dies", literal)) {
> + result = topology->die_cpus_lists;
> + goto out;
> + }
> + if (!strcmp("#num_cores", literal)) {
> + result = topology->core_cpus_lists;

if we find that we now get the same print many times, how about:
pr_debug2_once("literal: num_cores = %f\n", result);

... not sure if it scales though

Thanks,
John


> + goto out;
> + }
>
> pr_err("Unrecognized literal '%s'", literal);
> - return NAN;
> +out:
> + pr_debug2("literal: %s = %f\n", literal, result);
> + return result;
> }

\
 
 \ /
  Last update: 2021-11-24 18:28    [W:0.069 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site