Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

From: Jiri Olsa
Date: Fri Oct 14 2016 - 08:18:55 EST


On Thu, Oct 13, 2016 at 02:15:25PM -0700, Andi Kleen wrote:

SNIP

> @@ -376,6 +412,16 @@ int json_events(const char *fn,
> nz = !json_streq(map, val, "0");
> if (match_field(map, field, nz, &event, val)) {
> /* ok */
> + } else if (json_streq(map, field, "EventCode")) {
> + char *code = NULL;
> + addfield(map, &code, "", "", val);
> + eventcode |= strtoul(code, NULL, 0);
> + free(code);
> + } else if (json_streq(map, field, "ExtSel")) {
> + char *code = NULL;
> + addfield(map, &code, "", "", val);
> + eventcode |= strtoul(code, NULL, 0) << 21;
> + free(code);

could you please separate this (EventCode/ExtSel) change from the rest?


thanks,
jirka