From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700AbcJNMSw (ORCPT ); Fri, 14 Oct 2016 08:18:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753514AbcJNMSv (ORCPT ); Fri, 14 Oct 2016 08:18:51 -0400 Date: Fri, 14 Oct 2016 14:18:47 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, sukadev@linux.vnet.ibm.com, eranian@google.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files Message-ID: <20161014121847.GA1356@krava> References: <1476393332-20732-1-git-send-email-andi@firstfloor.org> <1476393332-20732-4-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476393332-20732-4-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 14 Oct 2016 12:18:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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