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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200706125757.GA3424581@krava>
Date:   Mon, 6 Jul 2020 14:57:57 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     kajoljain <kjain@...ux.ibm.com>
Cc:     Ian Rogers <irogers@...gle.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Paul Clarke <pc@...ibm.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Jin Yao <yao.jin@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users <linux-perf-users@...r.kernel.org>,
        maddy@...ux.ibm.com, Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
        Anju T Sudhakar <anju@...ux.vnet.ibm.com>,
        "Liang, Kan" <kan.liang@...ux.intel.com>
Subject: Re: [RFC 1/3] perf jevents: Add support for parsing perchip/percore
 events

On Fri, Jul 03, 2020 at 11:50:28AM +0530, kajoljain wrote:

SNIP

>  ]
> diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
> index fa86c5f997cc..dd2b14cc147c 100644
> --- a/tools/perf/pmu-events/jevents.c
> +++ b/tools/perf/pmu-events/jevents.c
> @@ -53,6 +53,23 @@
>  int verbose;
>  char *prog;
>  
> +enum event_class {
> +	PerChip = 0,
> +	PerPkg = 1,
> +	PerCore = 2
> +};

could you please split this into patch that changes perpkg
into the class type string and another that adds new PerChip/PerCore?

> +
> +enum event_class convert(const char* event_class_type) {
> +
> +	if (!strcmp(event_class_type, "PerCore"))
> +		return PerCore;
> +	else if (!strcmp(event_class_type, "PerChip"))
> +		return PerChip;
> +	else if (!strcmp(event_class_type, "PerPkg"))
> +		return PerPkg;
> +	return -1;
> +}
> +
>  int eprintf(int level, int var, const char *fmt, ...)
>  {
>  
> @@ -320,7 +337,7 @@ static void print_events_table_prefix(FILE *fp, const char *tblname)
>  
>  static int print_events_table_entry(void *data, char *name, char *event,
>  				    char *desc, char *long_desc,
> -				    char *pmu, char *unit, char *perpkg,
> +				    char *pmu, char *unit, char *event_class_type,

maybe 'aggregation' or 'aggr_mode' would be better name than event_class_type?

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ