lkml.org 
[lkml]   [2016]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 03/10] perf, tools: Add support for parsing uncore json files
    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);
    > } else if (json_streq(map, field, "EventName")) {
    > addfield(map, &name, "", "", val);
    > } else if (json_streq(map, field, "BriefDescription")) {
    > @@ -399,6 +445,26 @@ int json_events(const char *fn,
    > addfield(map, &extra_desc, ". ",
    > " Supports address when precise",
    > NULL);
    > + } else if (json_streq(map, field, "Unit")) {

    so I remember you said you're preparing JSON events files for perf,
    so why not call this field "Pmu" directly? Would be less confusing
    wrt the ScaleUnit field

    thanks,
    jirka

    \
     
     \ /
      Last update: 2016-10-14 14:24    [W:2.822 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site