lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a516c85-695c-60da-a3cc-ab1c1b08c87f@huawei.com>
Date:   Wed, 24 Nov 2021 17:28:01 +0000
From:   John Garry <john.garry@...wei.com>
To:     Ian Rogers <irogers@...gle.com>, Andi Kleen <ak@...ux.intel.com>,
        "Jiri Olsa" <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
        Kajol Jain <kjain@...ux.ibm.com>,
        "Paul A . Clarke" <pc@...ibm.com>,
        "Arnaldo Carvalho de Melo" <acme@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Konstantin Khlebnikov <koct9i@...il.com>,
        <linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <eranian@...gle.com>
Subject: Re: [PATCH v2 1/4] perf expr: Add debug logging for literals


>   	}
> -	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;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ