Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257141
b: refs/heads/master
c: 0111919
h: refs/heads/master
i:
  257139: c9bfab1
v: v3
  • Loading branch information
Jiri Olsa authored and Ingo Molnar committed Jul 21, 2011
1 parent 73f3e3c commit 546f843
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40bcea7bbe8fe452a2d272e2ffd3dea281eec9ff
refs/heads/master: 0111919da268e1ced315e009ad0d0435a2fb32ac
13 changes: 8 additions & 5 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,24 @@ static const char *sw_event_names[PERF_COUNT_SW_MAX] = {

#define MAX_ALIASES 8

static const char *hw_cache[][MAX_ALIASES] = {
static const char *hw_cache[PERF_COUNT_HW_CACHE_MAX][MAX_ALIASES] = {
{ "L1-dcache", "l1-d", "l1d", "L1-data", },
{ "L1-icache", "l1-i", "l1i", "L1-instruction", },
{ "LLC", "L2" },
{ "LLC", "L2", },
{ "dTLB", "d-tlb", "Data-TLB", },
{ "iTLB", "i-tlb", "Instruction-TLB", },
{ "branch", "branches", "bpu", "btb", "bpc", },
{ "node", },
};

static const char *hw_cache_op[][MAX_ALIASES] = {
static const char *hw_cache_op[PERF_COUNT_HW_CACHE_OP_MAX][MAX_ALIASES] = {
{ "load", "loads", "read", },
{ "store", "stores", "write", },
{ "prefetch", "prefetches", "speculative-read", "speculative-load", },
};

static const char *hw_cache_result[][MAX_ALIASES] = {
static const char *hw_cache_result[PERF_COUNT_HW_CACHE_RESULT_MAX]
[MAX_ALIASES] = {
{ "refs", "Reference", "ops", "access", },
{ "misses", "miss", },
};
Expand All @@ -124,6 +126,7 @@ static unsigned long hw_cache_stat[C(MAX)] = {
[C(DTLB)] = (CACHE_READ | CACHE_WRITE | CACHE_PREFETCH),
[C(ITLB)] = (CACHE_READ),
[C(BPU)] = (CACHE_READ),
[C(NODE)] = (CACHE_READ | CACHE_WRITE | CACHE_PREFETCH),
};

#define for_each_subsystem(sys_dir, sys_dirent, sys_next) \
Expand Down Expand Up @@ -393,7 +396,7 @@ parse_generic_hw_event(const char **str, struct perf_event_attr *attr)
PERF_COUNT_HW_CACHE_OP_MAX);
if (cache_op >= 0) {
if (!is_cache_op_valid(cache_type, cache_op))
return 0;
return EVT_FAILED;
continue;
}
}
Expand Down

0 comments on commit 546f843

Please sign in to comment.