Skip to content

Commit

Permalink
jevents: Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Nov 12, 2015
1 parent 558d520 commit a59f735
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jevents/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ int jevent_name_to_attr(char *str, struct perf_event_attr *attr)
return -1;
char *type = NULL;
/* FIXME need interface for multiple outputs and try more instances */
if (try_pmu_type(&type, "%s", pmu) < 0)
if (try_pmu_type(&type, "uncore_%s", pmu) < 0)
if (try_pmu_type(&type, "uncore_%s_1", pmu) < 0)
return -1;
if (try_pmu_type(&type, "%s", pmu) < 0 &&
try_pmu_type(&type, "uncore_%s", pmu) < 0 &&
try_pmu_type(&type, "uncore_%s_0", pmu) < 0 &&
try_pmu_type(&type, "uncore_%s_1", pmu) < 0)
return -1;
attr->type = atoi(type);
free(type);
if (parse_terms(pmu, config, attr, 0) < 0)
Expand Down

0 comments on commit a59f735

Please sign in to comment.