| 1 |
// pcl aka perf aka perf-events tapset |
| 2 |
// Copyright (C) 2010-2015 Red Hat Inc. |
| 3 |
// |
| 4 |
// This file is free software. You can redistribute it and/or modify it under |
| 5 |
// the terms of the GNU General Public License (GPL), version 2. |
| 6 |
|
| 7 |
// The type and config values are part of the sys_perf_event_open() ABI, |
| 8 |
// 'perf_event_attr' struct. See <include/uapi/linux/perf_event.h>. |
| 9 |
|
| 10 |
// PERF_TYPE_HW |
| 11 |
probe perf.hw.cpu_cycles = perf.type(0).config(0) { } |
| 12 |
probe perf.hw.instructions = perf.type(0).config(1) { } |
| 13 |
probe perf.hw.cache_references = perf.type(0).config(2) { } |
| 14 |
probe perf.hw.cache_misses = perf.type(0).config(3) { } |
| 15 |
probe perf.hw.branch_instructions = perf.type(0).config(4) { } |
| 16 |
probe perf.hw.branch_misses = perf.type(0).config(5) { } |
| 17 |
probe perf.hw.bus_cycles = perf.type(0).config(6) { } |
| 18 |
probe perf.hw.stalled_cycles_frontend = perf.type(0).config(7) { } |
| 19 |
probe perf.hw.stalled_cycles_backend = perf.type(0).config(8) { } |
| 20 |
probe perf.hw.ref_cpu_cycles = perf.type(0).config(9) { } |
| 21 |
|
| 22 |
// PERF_TYPE_SOFTWARE |
| 23 |
probe perf.sw.cpu_clock = perf.type(1).config(0) { } |
| 24 |
probe perf.sw.task_clock = perf.type(1).config(1) { } |
| 25 |
probe perf.sw.page_faults = perf.type(1).config(2) { } |
| 26 |
probe perf.sw.context_switches = perf.type(1).config(3) { } |
| 27 |
probe perf.sw.cpu_migrations = perf.type(1).config(4) { } |
| 28 |
probe perf.sw.page_faults_min = perf.type(1).config(5) { } |
| 29 |
probe perf.sw.page_faults_maj = perf.type(1).config(6) { } |
| 30 |
probe perf.sw.alignment_faults = perf.type(1).config(7) { } |
| 31 |
probe perf.sw.emulation_faults = perf.type(1).config(8) { } |
| 32 |
|
| 33 |
// PERF_TYPE_TRACEPOINT: PR10745 |
| 34 |
// probe perf.tracepoint.FOO = perf.type(2).config(NNN) { } |
| 35 |
|
| 36 |
// PERF_TYPE_HW_CACHE, encoded into config (cache_op_result_id<<16 | cache_op_id<<8 | cache_id) |
| 37 |
probe perf.hw_cache.l1d.read.access = perf.type(3).config(0x000000) {} |
| 38 |
probe perf.hw_cache.l1d.read.miss = perf.type(3).config(0x010000) {} |
| 39 |
probe perf.hw_cache.l1d.write.access = perf.type(3).config(0x000100) {} |
| 40 |
probe perf.hw_cache.l1d.write.miss = perf.type(3).config(0x010100) {} |
| 41 |
probe perf.hw_cache.l1d.prefetch.access = perf.type(3).config(0x000200) {} |
| 42 |
probe perf.hw_cache.l1d.prefetch.miss = perf.type(3).config(0x010200) {} |
| 43 |
|
| 44 |
// according to kernel tools/perf/util/parse-events.c, WRITE not available |
| 45 |
probe perf.hw_cache.l1i.read.access = perf.type(3).config(0x000001) {} |
| 46 |
probe perf.hw_cache.l1i.read.miss = perf.type(3).config(0x010001) {} |
| 47 |
//probe perf.hw_cache.l1i.write.access = perf.type(3).config(0x000101) {} |
| 48 |
//probe perf.hw_cache.l1i.write.miss = perf.type(3).config(0x010101) {} |
| 49 |
probe perf.hw_cache.l1i.prefetch.access = perf.type(3).config(0x000201) {} |
| 50 |
probe perf.hw_cache.l1i.prefetch.miss = perf.type(3).config(0x010201) {} |
| 51 |
|
| 52 |
probe perf.hw_cache.ll.read.access = perf.type(3).config(0x000002) {} |
| 53 |
probe perf.hw_cache.ll.read.miss = perf.type(3).config(0x010002) {} |
| 54 |
probe perf.hw_cache.ll.write.access = perf.type(3).config(0x000102) {} |
| 55 |
probe perf.hw_cache.ll.write.miss = perf.type(3).config(0x010102) {} |
| 56 |
probe perf.hw_cache.ll.prefetch.access = perf.type(3).config(0x000202) {} |
| 57 |
probe perf.hw_cache.ll.prefetch.miss = perf.type(3).config(0x010202) {} |
| 58 |
|
| 59 |
probe perf.hw_cache.dtlb.read.access = perf.type(3).config(0x000003) {} |
| 60 |
probe perf.hw_cache.dtlb.read.miss = perf.type(3).config(0x010003) {} |
| 61 |
probe perf.hw_cache.dtlb.write.access = perf.type(3).config(0x000103) {} |
| 62 |
probe perf.hw_cache.dtlb.write.miss = perf.type(3).config(0x010103) {} |
| 63 |
probe perf.hw_cache.dtlb.prefetch.access = perf.type(3).config(0x000203) {} |
| 64 |
probe perf.hw_cache.dtlb.prefetch.miss = perf.type(3).config(0x010203) {} |
| 65 |
|
| 66 |
// according to kernel tools/perf/util/parse-events.c, WRITE, PREFETCH not available |
| 67 |
probe perf.hw_cache.itlb.read.access = perf.type(3).config(0x000004) {} |
| 68 |
probe perf.hw_cache.itlb.read.miss = perf.type(3).config(0x010004) {} |
| 69 |
//probe perf.hw_cache.itlb.write.access = perf.type(3).config(0x000104) {} |
| 70 |
//probe perf.hw_cache.itlb.write.miss = perf.type(3).config(0x010104) {} |
| 71 |
//probe perf.hw_cache.itlb.prefetch.access = perf.type(3).config(0x000204) {} |
| 72 |
//probe perf.hw_cache.itlb.prefetch.miss = perf.type(3).config(0x010204) {} |
| 73 |
|
| 74 |
// according to kernel tools/perf/util/parse-events.c, WRITE, PREFETCH not available |
| 75 |
probe perf.hw_cache.bpu.read.access = perf.type(3).config(0x000005) {} |
| 76 |
probe perf.hw_cache.bpu.read.miss = perf.type(3).config(0x010005) {} |
| 77 |
//probe perf.hw_cache.bpu.write.access = perf.type(3).config(0x000105) {} |
| 78 |
//probe perf.hw_cache.bpu.write.miss = perf.type(3).config(0x010105) {} |
| 79 |
//probe perf.hw_cache.bpu.prefetch.access = perf.type(3).config(0x000205) {} |
| 80 |
//probe perf.hw_cache.bpu.prefetch.miss = perf.type(3).config(0x010205) {} |
| 81 |
|
| 82 |
probe perf.hw_cache.node.read.access = perf.type(3).config(0x000006) {} |
| 83 |
probe perf.hw_cache.node.read.miss = perf.type(3).config(0x010006) {} |
| 84 |
probe perf.hw_cache.node.write.access = perf.type(3).config(0x000106) {} |
| 85 |
probe perf.hw_cache.ndoe.write.miss = perf.type(3).config(0x010106) {} |
| 86 |
//probe perf.hw_cache.node.prefetch.access = perf.type(3).config(0x000206) {} |
| 87 |
//probe perf.hw_cache.node.prefetch.miss = perf.type(3).config(0x010206) {} |
| 88 |
|