Add tool PMU events to report network statistics from /proc/net/dev.
The events can be read system-wide (from /proc/net/dev) or per-process
(from /proc/pid/net/dev).
The following events are added for both RX (receive) and TX (transmit):
- bytes
- packets
- errors
- drop
- fifo
- frame (RX only) / colls (TX only)
- compressed
- multicast (RX only) / carrier (TX only)
Updates tool.json with the new events and descriptions. Updates
tool_pmu implementation to parse the net/dev format.
Below are examples of system-wide and per-process gathering respectively:
```
$ perf stat -e net_rx_bytes,net_rx_compressed,net_rx_drop,net_rx_errors,net_rx_fifo,net_rx_frame,net_rx_multicast,net_rx_packets,net_tx_bytes,net_tx_carrier,net_tx_colls,net_tx_compressed,net_tx_drop,net_tx_errors,net_tx_fifo,net_tx_packets -I 1000
1.001154872 0 net_rx_bytes
1.001154872 0 net_rx_compressed
1.001154872 444,577 net_rx_drop
1.001154872 4,824,888 net_rx_errors
1.001154872 0 net_rx_fifo
1.001154872 0 net_rx_frame
1.001154872 0 net_rx_multicast
1.001154872 4,408,889,452 net_rx_packets
1.001154872 0 net_tx_bytes
1.001154872 0 net_tx_carrier
1.001154872 0 net_tx_colls
1.001154872 0 net_tx_compressed
1.001154872 0 net_tx_drop
1.001154872 0 net_tx_errors
1.001154872 0 net_tx_fifo
1.001154872 0 net_tx_packets
$ perf stat -e net_rx_bytes,net_rx_compressed,net_rx_drop,net_rx_errors,net_rx_fifo,net_rx_frame,net_rx_multicast,net_rx_packets,net_tx_bytes,net_tx_carrier,net_tx_colls,net_tx_compressed,net_tx_drop,net_tx_errors,net_tx_fifo,net_tx_packets -p $(pidof -d, chrome) -I 1000
1.001023475 0 net_rx_bytes
1.001023475 0 net_rx_compressed
1.001023475 42,647,328 net_rx_drop
1.001023475 463,069,152 net_rx_errors
1.001023475 0 net_rx_fifo
1.001023475 0 net_rx_frame
1.001023475 0 net_rx_multicast
1.001023475 423,195,831,744 net_rx_packets
1.001023475 0 net_tx_bytes
1.001023475 0 net_tx_carrier
1.001023475 0 net_tx_colls
1.001023475 0 net_tx_compressed
1.001023475 0 net_tx_drop
1.001023475 0 net_tx_errors
1.001023475 0 net_tx_fifo
1.001023475 0 net_tx_packets
...
```
Signed-off-by: Ian Rogers <irogers@google.com>
---
.../pmu-events/arch/common/common/tool.json | 98 ++++++-
tools/perf/pmu-events/empty-pmu-events.c | 256 ++++++++++--------
tools/perf/util/tool_pmu.c | 155 ++++++++++-
tools/perf/util/tool_pmu.h | 16 ++
4 files changed, 404 insertions(+), 121 deletions(-)
diff --git a/tools/perf/pmu-events/arch/common/common/tool.json b/tools/perf/pmu-events/arch/common/common/tool.json
index 4b3fce655f8a..ebd3c5a6d15d 100644
--- a/tools/perf/pmu-events/arch/common/common/tool.json
+++ b/tools/perf/pmu-events/arch/common/common/tool.json
@@ -250,5 +250,101 @@
"EventName": "memory_uss",
"BriefDescription": "Unique Set Size (USS) in bytes",
"ConfigCode": "42"
- }
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_bytes",
+ "BriefDescription": "Network received bytes",
+ "ConfigCode": "43"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_packets",
+ "BriefDescription": "Network received packets",
+ "ConfigCode": "44"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_errors",
+ "BriefDescription": "Network received errors",
+ "ConfigCode": "45"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_drop",
+ "BriefDescription": "Network received dropped packets",
+ "ConfigCode": "46"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_fifo",
+ "BriefDescription": "Network received fifo overruns",
+ "ConfigCode": "47"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_frame",
+ "BriefDescription": "Network received framing errors",
+ "ConfigCode": "48"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_compressed",
+ "BriefDescription": "Network received compressed packets",
+ "ConfigCode": "49"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_rx_multicast",
+ "BriefDescription": "Network received multicast packets",
+ "ConfigCode": "50"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_bytes",
+ "BriefDescription": "Network transmitted bytes",
+ "ConfigCode": "51"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_packets",
+ "BriefDescription": "Network transmitted packets",
+ "ConfigCode": "52"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_errors",
+ "BriefDescription": "Network transmitted errors",
+ "ConfigCode": "53"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_drop",
+ "BriefDescription": "Network transmitted dropped packets",
+ "ConfigCode": "54"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_fifo",
+ "BriefDescription": "Network transmitted fifo overruns",
+ "ConfigCode": "55"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_colls",
+ "BriefDescription": "Network transmitted collisions",
+ "ConfigCode": "56"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_carrier",
+ "BriefDescription": "Network transmitted carrier losses",
+ "ConfigCode": "57"
+ },
+ {
+ "Unit": "tool",
+ "EventName": "net_tx_compressed",
+ "BriefDescription": "Network transmitted compressed packets",
+ "ConfigCode": "58"
+ }
]
diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c
index 4b7c534f1801..0debd0003dbc 100644
--- a/tools/perf/pmu-events/empty-pmu-events.c
+++ b/tools/perf/pmu-events/empty-pmu-events.c
@@ -1309,62 +1309,78 @@ static const char *const big_c_string =
/* offset=128860 */ "memory_swap_pss\000tool\000Proportional Share Size (PSS) for swap memory in bytes\000config=0x28\000\00000\000\000\000\000\000"
/* offset=128956 */ "memory_text\000tool\000Memory dedicated to code (text segment) in bytes\000config=0x29\000\00000\000\000\000\000\000"
/* offset=129042 */ "memory_uss\000tool\000Unique Set Size (USS) in bytes\000config=0x2a\000\00000\000\000\000\000\000"
-/* offset=129109 */ "bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000\000\000\000"
-/* offset=129171 */ "bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000\000\000\000"
-/* offset=129233 */ "l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000\000\000\000Attributable Level 3 cache access, read\000"
-/* offset=129331 */ "segment_reg_loads.any\000other\000Number of segment register loads\000event=6,period=200000,umask=0x80\000\00000\000\000\000\000\000"
-/* offset=129433 */ "dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for any reason\000event=9,period=200000,umask=0x20\000\00000\000\000\000\000\000"
-/* offset=129566 */ "eist_trans\000other\000Number of Enhanced Intel SpeedStep(R) Technology (EIST) transitions\000event=0x3a,period=200000\000\00000\000\000\000\000\000"
-/* offset=129684 */ "hisi_sccl,ddrc\000"
-/* offset=129699 */ "uncore_hisi_ddrc.flux_wcmd\000uncore\000DDRC write commands\000event=2\000\00000\000\000\000\000\000"
-/* offset=129769 */ "uncore_cbox\000"
-/* offset=129781 */ "unc_cbo_xsnp_response.miss_eviction\000uncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event=0x22,umask=0x81\000\00000\000\000\000\000\000"
-/* offset=129935 */ "event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000\000\000\000\000"
-/* offset=129989 */ "event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000\000\000\000\000"
-/* offset=130047 */ "hisi_sccl,l3c\000"
-/* offset=130061 */ "uncore_hisi_l3c.rd_hit_cpipe\000uncore\000Total read hits\000event=7\000\00000\000\000\000\000\000"
-/* offset=130129 */ "uncore_imc_free_running\000"
-/* offset=130153 */ "uncore_imc_free_running.cache_miss\000uncore\000Total cache misses\000event=0x12\000\00000\000\000\000\000\000"
-/* offset=130233 */ "uncore_imc\000"
-/* offset=130244 */ "uncore_imc.cache_hits\000uncore\000Total cache hits\000event=0x34\000\00000\000\000\000\000\000"
-/* offset=130309 */ "uncore_sys_ddr_pmu\000"
-/* offset=130328 */ "sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000\000\000\000\000\000"
-/* offset=130404 */ "uncore_sys_ccn_pmu\000"
-/* offset=130423 */ "sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\00000\000\000\000\000\000"
-/* offset=130500 */ "uncore_sys_cmn_pmu\000"
-/* offset=130519 */ "sys_cmn_pmu.hnf_cache_miss\000uncore\000Counts total cache misses in first lookup result (high priority)\000eventid=1,type=5\000(434|436|43c|43a).*\00000\000\000\000\000\000"
-/* offset=130662 */ "CPUs_utilized\000Default\000(software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@) / (duration_time * 1e9)\000\000Average CPU utilization\000\0001CPUs\000\000\000\000011"
-/* offset=130848 */ "cs_per_second\000Default\000software@context\\-switches\\,name\\=context\\-switches@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Context switches per CPU second\000\0001cs/sec\000\000\000\000011"
-/* offset=131081 */ "migrations_per_second\000Default\000software@cpu\\-migrations\\,name\\=cpu\\-migrations@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Process migrations to a new CPU per CPU second\000\0001migrations/sec\000\000\000\000011"
-/* offset=131341 */ "page_faults_per_second\000Default\000software@page\\-faults\\,name\\=page\\-faults@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Page faults per CPU second\000\0001faults/sec\000\000\000\000011"
-/* offset=131572 */ "insn_per_cycle\000Default\000instructions / cpu\\-cycles\000insn_per_cycle < 1\000Instructions Per Cycle\000\0001instructions\000\000\000\000001"
-/* offset=131685 */ "stalled_cycles_per_instruction\000Default\000max(stalled\\-cycles\\-frontend, stalled\\-cycles\\-backend) / instructions\000\000Max front or backend stalls per instruction\000\000\000\000\000\000001"
-/* offset=131849 */ "frontend_cycles_idle\000Default\000stalled\\-cycles\\-frontend / cpu\\-cycles\000frontend_cycles_idle > 0.1\000Frontend stalls per cycle\000\000\000\000\000\000001"
-/* offset=131979 */ "backend_cycles_idle\000Default\000stalled\\-cycles\\-backend / cpu\\-cycles\000backend_cycles_idle > 0.2\000Backend stalls per cycle\000\000\000\000\000\000001"
-/* offset=132105 */ "cycles_frequency\000Default\000cpu\\-cycles / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Cycles per CPU second\000\0001GHz\000\000\000\000011"
-/* offset=132281 */ "branch_frequency\000Default\000branches / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Branches per CPU second\000\0001000M/sec\000\000\000\000011"
-/* offset=132461 */ "branch_miss_rate\000Default\000branch\\-misses / branches\000branch_miss_rate > 0.05\000Branch miss rate\000\000100%\000\000\000\000001"
-/* offset=132565 */ "l1d_miss_rate\000Default2\000L1\\-dcache\\-load\\-misses / L1\\-dcache\\-loads\000l1d_miss_rate > 0.05\000L1D miss rate\000\000100%\000\000\000\000001"
-/* offset=132681 */ "llc_miss_rate\000Default2\000LLC\\-load\\-misses / LLC\\-loads\000llc_miss_rate > 0.05\000LLC miss rate\000\000100%\000\000\000\000001"
-/* offset=132782 */ "l1i_miss_rate\000Default3\000L1\\-icache\\-load\\-misses / L1\\-icache\\-loads\000l1i_miss_rate > 0.05\000L1I miss rate\000\000100%\000\000\000\000001"
-/* offset=132897 */ "dtlb_miss_rate\000Default3\000dTLB\\-load\\-misses / dTLB\\-loads\000dtlb_miss_rate > 0.05\000dTLB miss rate\000\000100%\000\000\000\000001"
-/* offset=133003 */ "itlb_miss_rate\000Default3\000iTLB\\-load\\-misses / iTLB\\-loads\000itlb_miss_rate > 0.05\000iTLB miss rate\000\000100%\000\000\000\000001"
-/* offset=133109 */ "l1_prefetch_miss_rate\000Default4\000L1\\-dcache\\-prefetch\\-misses / L1\\-dcache\\-prefetches\000l1_prefetch_miss_rate > 0.05\000L1 prefetch miss rate\000\000100%\000\000\000\000001"
-/* offset=133257 */ "CPI\000\0001 / IPC\000\000\000\000\000\000\000\000000"
-/* offset=133280 */ "IPC\000group1\000inst_retired.any / cpu_clk_unhalted.thread\000\000\000\000\000\000\000\000000"
-/* offset=133344 */ "Frontend_Bound_SMT\000\000idq_uops_not_delivered.core / (4 * (cpu_clk_unhalted.thread / 2 * (1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk)))\000\000\000\000\000\000\000\000000"
-/* offset=133511 */ "dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000"
-/* offset=133576 */ "icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000"
-/* offset=133644 */ "cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\000000"
-/* offset=133716 */ "DCache_L2_All_Hits\000\000l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit\000\000\000\000\000\000\000\000000"
-/* offset=133811 */ "DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss\000\000\000\000\000\000\000\000000"
-/* offset=133946 */ "DCache_L2_All\000\000DCache_L2_All_Hits + DCache_L2_All_Miss\000\000\000\000\000\000\000\000000"
-/* offset=134011 */ "DCache_L2_Hits\000\000d_ratio(DCache_L2_All_Hits, DCache_L2_All)\000\000\000\000\000\000\000\000000"
-/* offset=134080 */ "DCache_L2_Misses\000\000d_ratio(DCache_L2_All_Miss, DCache_L2_All)\000\000\000\000\000\000\000\000000"
-/* offset=134151 */ "M1\000\000ipc + M2\000\000\000\000\000\000\000\000000"
-/* offset=134174 */ "M2\000\000ipc + M1\000\000\000\000\000\000\000\000000"
-/* offset=134197 */ "M3\000\0001 / M3\000\000\000\000\000\000\000\000000"
-/* offset=134218 */ "L1D_Cache_Fill_BW\000\00064 * l1d.replacement / 1e9 / duration_time\000\000\000\000\000\000\000\000000"
+/* offset=129109 */ "net_rx_bytes\000tool\000Network received bytes\000config=0x2b\000\00000\000\000\000\000\000"
+/* offset=129170 */ "net_rx_packets\000tool\000Network received packets\000config=0x2c\000\00000\000\000\000\000\000"
+/* offset=129235 */ "net_rx_errors\000tool\000Network received errors\000config=0x2d\000\00000\000\000\000\000\000"
+/* offset=129298 */ "net_rx_drop\000tool\000Network received dropped packets\000config=0x2e\000\00000\000\000\000\000\000"
+/* offset=129368 */ "net_rx_fifo\000tool\000Network received fifo overruns\000config=0x2f\000\00000\000\000\000\000\000"
+/* offset=129436 */ "net_rx_frame\000tool\000Network received framing errors\000config=0x30\000\00000\000\000\000\000\000"
+/* offset=129506 */ "net_rx_compressed\000tool\000Network received compressed packets\000config=0x31\000\00000\000\000\000\000\000"
+/* offset=129585 */ "net_rx_multicast\000tool\000Network received multicast packets\000config=0x32\000\00000\000\000\000\000\000"
+/* offset=129662 */ "net_tx_bytes\000tool\000Network transmitted bytes\000config=0x33\000\00000\000\000\000\000\000"
+/* offset=129726 */ "net_tx_packets\000tool\000Network transmitted packets\000config=0x34\000\00000\000\000\000\000\000"
+/* offset=129794 */ "net_tx_errors\000tool\000Network transmitted errors\000config=0x35\000\00000\000\000\000\000\000"
+/* offset=129860 */ "net_tx_drop\000tool\000Network transmitted dropped packets\000config=0x36\000\00000\000\000\000\000\000"
+/* offset=129933 */ "net_tx_fifo\000tool\000Network transmitted fifo overruns\000config=0x37\000\00000\000\000\000\000\000"
+/* offset=130004 */ "net_tx_colls\000tool\000Network transmitted collisions\000config=0x38\000\00000\000\000\000\000\000"
+/* offset=130073 */ "net_tx_carrier\000tool\000Network transmitted carrier losses\000config=0x39\000\00000\000\000\000\000\000"
+/* offset=130148 */ "net_tx_compressed\000tool\000Network transmitted compressed packets\000config=0x3a\000\00000\000\000\000\000\000"
+/* offset=130230 */ "bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000\000\000\000"
+/* offset=130292 */ "bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000\000\000\000"
+/* offset=130354 */ "l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000\000\000\000Attributable Level 3 cache access, read\000"
+/* offset=130452 */ "segment_reg_loads.any\000other\000Number of segment register loads\000event=6,period=200000,umask=0x80\000\00000\000\000\000\000\000"
+/* offset=130554 */ "dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for any reason\000event=9,period=200000,umask=0x20\000\00000\000\000\000\000\000"
+/* offset=130687 */ "eist_trans\000other\000Number of Enhanced Intel SpeedStep(R) Technology (EIST) transitions\000event=0x3a,period=200000\000\00000\000\000\000\000\000"
+/* offset=130805 */ "hisi_sccl,ddrc\000"
+/* offset=130820 */ "uncore_hisi_ddrc.flux_wcmd\000uncore\000DDRC write commands\000event=2\000\00000\000\000\000\000\000"
+/* offset=130890 */ "uncore_cbox\000"
+/* offset=130902 */ "unc_cbo_xsnp_response.miss_eviction\000uncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event=0x22,umask=0x81\000\00000\000\000\000\000\000"
+/* offset=131056 */ "event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000\000\000\000\000"
+/* offset=131110 */ "event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000\000\000\000\000"
+/* offset=131168 */ "hisi_sccl,l3c\000"
+/* offset=131182 */ "uncore_hisi_l3c.rd_hit_cpipe\000uncore\000Total read hits\000event=7\000\00000\000\000\000\000\000"
+/* offset=131250 */ "uncore_imc_free_running\000"
+/* offset=131274 */ "uncore_imc_free_running.cache_miss\000uncore\000Total cache misses\000event=0x12\000\00000\000\000\000\000\000"
+/* offset=131354 */ "uncore_imc\000"
+/* offset=131365 */ "uncore_imc.cache_hits\000uncore\000Total cache hits\000event=0x34\000\00000\000\000\000\000\000"
+/* offset=131430 */ "uncore_sys_ddr_pmu\000"
+/* offset=131449 */ "sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000\000\000\000\000\000"
+/* offset=131525 */ "uncore_sys_ccn_pmu\000"
+/* offset=131544 */ "sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\00000\000\000\000\000\000"
+/* offset=131621 */ "uncore_sys_cmn_pmu\000"
+/* offset=131640 */ "sys_cmn_pmu.hnf_cache_miss\000uncore\000Counts total cache misses in first lookup result (high priority)\000eventid=1,type=5\000(434|436|43c|43a).*\00000\000\000\000\000\000"
+/* offset=131783 */ "CPUs_utilized\000Default\000(software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@) / (duration_time * 1e9)\000\000Average CPU utilization\000\0001CPUs\000\000\000\000011"
+/* offset=131969 */ "cs_per_second\000Default\000software@context\\-switches\\,name\\=context\\-switches@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Context switches per CPU second\000\0001cs/sec\000\000\000\000011"
+/* offset=132202 */ "migrations_per_second\000Default\000software@cpu\\-migrations\\,name\\=cpu\\-migrations@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Process migrations to a new CPU per CPU second\000\0001migrations/sec\000\000\000\000011"
+/* offset=132462 */ "page_faults_per_second\000Default\000software@page\\-faults\\,name\\=page\\-faults@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Page faults per CPU second\000\0001faults/sec\000\000\000\000011"
+/* offset=132693 */ "insn_per_cycle\000Default\000instructions / cpu\\-cycles\000insn_per_cycle < 1\000Instructions Per Cycle\000\0001instructions\000\000\000\000001"
+/* offset=132806 */ "stalled_cycles_per_instruction\000Default\000max(stalled\\-cycles\\-frontend, stalled\\-cycles\\-backend) / instructions\000\000Max front or backend stalls per instruction\000\000\000\000\000\000001"
+/* offset=132970 */ "frontend_cycles_idle\000Default\000stalled\\-cycles\\-frontend / cpu\\-cycles\000frontend_cycles_idle > 0.1\000Frontend stalls per cycle\000\000\000\000\000\000001"
+/* offset=133100 */ "backend_cycles_idle\000Default\000stalled\\-cycles\\-backend / cpu\\-cycles\000backend_cycles_idle > 0.2\000Backend stalls per cycle\000\000\000\000\000\000001"
+/* offset=133226 */ "cycles_frequency\000Default\000cpu\\-cycles / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Cycles per CPU second\000\0001GHz\000\000\000\000011"
+/* offset=133402 */ "branch_frequency\000Default\000branches / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Branches per CPU second\000\0001000M/sec\000\000\000\000011"
+/* offset=133582 */ "branch_miss_rate\000Default\000branch\\-misses / branches\000branch_miss_rate > 0.05\000Branch miss rate\000\000100%\000\000\000\000001"
+/* offset=133686 */ "l1d_miss_rate\000Default2\000L1\\-dcache\\-load\\-misses / L1\\-dcache\\-loads\000l1d_miss_rate > 0.05\000L1D miss rate\000\000100%\000\000\000\000001"
+/* offset=133802 */ "llc_miss_rate\000Default2\000LLC\\-load\\-misses / LLC\\-loads\000llc_miss_rate > 0.05\000LLC miss rate\000\000100%\000\000\000\000001"
+/* offset=133903 */ "l1i_miss_rate\000Default3\000L1\\-icache\\-load\\-misses / L1\\-icache\\-loads\000l1i_miss_rate > 0.05\000L1I miss rate\000\000100%\000\000\000\000001"
+/* offset=134018 */ "dtlb_miss_rate\000Default3\000dTLB\\-load\\-misses / dTLB\\-loads\000dtlb_miss_rate > 0.05\000dTLB miss rate\000\000100%\000\000\000\000001"
+/* offset=134124 */ "itlb_miss_rate\000Default3\000iTLB\\-load\\-misses / iTLB\\-loads\000itlb_miss_rate > 0.05\000iTLB miss rate\000\000100%\000\000\000\000001"
+/* offset=134230 */ "l1_prefetch_miss_rate\000Default4\000L1\\-dcache\\-prefetch\\-misses / L1\\-dcache\\-prefetches\000l1_prefetch_miss_rate > 0.05\000L1 prefetch miss rate\000\000100%\000\000\000\000001"
+/* offset=134378 */ "CPI\000\0001 / IPC\000\000\000\000\000\000\000\000000"
+/* offset=134401 */ "IPC\000group1\000inst_retired.any / cpu_clk_unhalted.thread\000\000\000\000\000\000\000\000000"
+/* offset=134465 */ "Frontend_Bound_SMT\000\000idq_uops_not_delivered.core / (4 * (cpu_clk_unhalted.thread / 2 * (1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk)))\000\000\000\000\000\000\000\000000"
+/* offset=134632 */ "dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000"
+/* offset=134697 */ "icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000"
+/* offset=134765 */ "cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\000000"
+/* offset=134837 */ "DCache_L2_All_Hits\000\000l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit\000\000\000\000\000\000\000\000000"
+/* offset=134932 */ "DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss\000\000\000\000\000\000\000\000000"
+/* offset=135067 */ "DCache_L2_All\000\000DCache_L2_All_Hits + DCache_L2_All_Miss\000\000\000\000\000\000\000\000000"
+/* offset=135132 */ "DCache_L2_Hits\000\000d_ratio(DCache_L2_All_Hits, DCache_L2_All)\000\000\000\000\000\000\000\000000"
+/* offset=135201 */ "DCache_L2_Misses\000\000d_ratio(DCache_L2_All_Miss, DCache_L2_All)\000\000\000\000\000\000\000\000000"
+/* offset=135272 */ "M1\000\000ipc + M2\000\000\000\000\000\000\000\000000"
+/* offset=135295 */ "M2\000\000ipc + M1\000\000\000\000\000\000\000\000000"
+/* offset=135318 */ "M3\000\0001 / M3\000\000\000\000\000\000\000\000000"
+/* offset=135339 */ "L1D_Cache_Fill_BW\000\00064 * l1d.replacement / 1e9 / duration_time\000\000\000\000\000\000\000\000000"
;
static const struct compact_pmu_event pmu_events__common_default_core[] = {
@@ -2648,6 +2664,22 @@ static const struct compact_pmu_event pmu_events__common_tool[] = {
{ 128860 }, /* memory_swap_pss\000tool\000Proportional Share Size (PSS) for swap memory in bytes\000config=0x28\000\00000\000\000\000\000\000 */
{ 128956 }, /* memory_text\000tool\000Memory dedicated to code (text segment) in bytes\000config=0x29\000\00000\000\000\000\000\000 */
{ 129042 }, /* memory_uss\000tool\000Unique Set Size (USS) in bytes\000config=0x2a\000\00000\000\000\000\000\000 */
+{ 129109 }, /* net_rx_bytes\000tool\000Network received bytes\000config=0x2b\000\00000\000\000\000\000\000 */
+{ 129506 }, /* net_rx_compressed\000tool\000Network received compressed packets\000config=0x31\000\00000\000\000\000\000\000 */
+{ 129298 }, /* net_rx_drop\000tool\000Network received dropped packets\000config=0x2e\000\00000\000\000\000\000\000 */
+{ 129235 }, /* net_rx_errors\000tool\000Network received errors\000config=0x2d\000\00000\000\000\000\000\000 */
+{ 129368 }, /* net_rx_fifo\000tool\000Network received fifo overruns\000config=0x2f\000\00000\000\000\000\000\000 */
+{ 129436 }, /* net_rx_frame\000tool\000Network received framing errors\000config=0x30\000\00000\000\000\000\000\000 */
+{ 129585 }, /* net_rx_multicast\000tool\000Network received multicast packets\000config=0x32\000\00000\000\000\000\000\000 */
+{ 129170 }, /* net_rx_packets\000tool\000Network received packets\000config=0x2c\000\00000\000\000\000\000\000 */
+{ 129662 }, /* net_tx_bytes\000tool\000Network transmitted bytes\000config=0x33\000\00000\000\000\000\000\000 */
+{ 130073 }, /* net_tx_carrier\000tool\000Network transmitted carrier losses\000config=0x39\000\00000\000\000\000\000\000 */
+{ 130004 }, /* net_tx_colls\000tool\000Network transmitted collisions\000config=0x38\000\00000\000\000\000\000\000 */
+{ 130148 }, /* net_tx_compressed\000tool\000Network transmitted compressed packets\000config=0x3a\000\00000\000\000\000\000\000 */
+{ 129860 }, /* net_tx_drop\000tool\000Network transmitted dropped packets\000config=0x36\000\00000\000\000\000\000\000 */
+{ 129794 }, /* net_tx_errors\000tool\000Network transmitted errors\000config=0x35\000\00000\000\000\000\000\000 */
+{ 129933 }, /* net_tx_fifo\000tool\000Network transmitted fifo overruns\000config=0x37\000\00000\000\000\000\000\000 */
+{ 129726 }, /* net_tx_packets\000tool\000Network transmitted packets\000config=0x34\000\00000\000\000\000\000\000 */
{ 125362 }, /* num_cores\000tool\000Number of cores. A core consists of 1 or more thread, with each thread being associated with a logical Linux CPU\000config=5\000\00000\000\000\000\000\000 */
{ 125507 }, /* num_cpus\000tool\000Number of logical Linux CPUs. There may be multiple such CPUs on a core\000config=6\000\00000\000\000\000\000\000 */
{ 125610 }, /* num_cpus_online\000tool\000Number of online logical Linux CPUs. There may be multiple such CPUs on a core\000config=7\000\00000\000\000\000\000\000 */
@@ -2681,23 +2713,23 @@ static const struct pmu_table_entry pmu_events__common[] = {
};
static const struct compact_pmu_event pmu_metrics__common_default_core[] = {
-{ 130662 }, /* CPUs_utilized\000Default\000(software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@) / (duration_time * 1e9)\000\000Average CPU utilization\000\0001CPUs\000\000\000\000011 */
-{ 131979 }, /* backend_cycles_idle\000Default\000stalled\\-cycles\\-backend / cpu\\-cycles\000backend_cycles_idle > 0.2\000Backend stalls per cycle\000\000\000\000\000\000001 */
-{ 132281 }, /* branch_frequency\000Default\000branches / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Branches per CPU second\000\0001000M/sec\000\000\000\000011 */
-{ 132461 }, /* branch_miss_rate\000Default\000branch\\-misses / branches\000branch_miss_rate > 0.05\000Branch miss rate\000\000100%\000\000\000\000001 */
-{ 130848 }, /* cs_per_second\000Default\000software@context\\-switches\\,name\\=context\\-switches@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Context switches per CPU second\000\0001cs/sec\000\000\000\000011 */
-{ 132105 }, /* cycles_frequency\000Default\000cpu\\-cycles / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Cycles per CPU second\000\0001GHz\000\000\000\000011 */
-{ 132897 }, /* dtlb_miss_rate\000Default3\000dTLB\\-load\\-misses / dTLB\\-loads\000dtlb_miss_rate > 0.05\000dTLB miss rate\000\000100%\000\000\000\000001 */
-{ 131849 }, /* frontend_cycles_idle\000Default\000stalled\\-cycles\\-frontend / cpu\\-cycles\000frontend_cycles_idle > 0.1\000Frontend stalls per cycle\000\000\000\000\000\000001 */
-{ 131572 }, /* insn_per_cycle\000Default\000instructions / cpu\\-cycles\000insn_per_cycle < 1\000Instructions Per Cycle\000\0001instructions\000\000\000\000001 */
-{ 133003 }, /* itlb_miss_rate\000Default3\000iTLB\\-load\\-misses / iTLB\\-loads\000itlb_miss_rate > 0.05\000iTLB miss rate\000\000100%\000\000\000\000001 */
-{ 133109 }, /* l1_prefetch_miss_rate\000Default4\000L1\\-dcache\\-prefetch\\-misses / L1\\-dcache\\-prefetches\000l1_prefetch_miss_rate > 0.05\000L1 prefetch miss rate\000\000100%\000\000\000\000001 */
-{ 132565 }, /* l1d_miss_rate\000Default2\000L1\\-dcache\\-load\\-misses / L1\\-dcache\\-loads\000l1d_miss_rate > 0.05\000L1D miss rate\000\000100%\000\000\000\000001 */
-{ 132782 }, /* l1i_miss_rate\000Default3\000L1\\-icache\\-load\\-misses / L1\\-icache\\-loads\000l1i_miss_rate > 0.05\000L1I miss rate\000\000100%\000\000\000\000001 */
-{ 132681 }, /* llc_miss_rate\000Default2\000LLC\\-load\\-misses / LLC\\-loads\000llc_miss_rate > 0.05\000LLC miss rate\000\000100%\000\000\000\000001 */
-{ 131081 }, /* migrations_per_second\000Default\000software@cpu\\-migrations\\,name\\=cpu\\-migrations@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Process migrations to a new CPU per CPU second\000\0001migrations/sec\000\000\000\000011 */
-{ 131341 }, /* page_faults_per_second\000Default\000software@page\\-faults\\,name\\=page\\-faults@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Page faults per CPU second\000\0001faults/sec\000\000\000\000011 */
-{ 131685 }, /* stalled_cycles_per_instruction\000Default\000max(stalled\\-cycles\\-frontend, stalled\\-cycles\\-backend) / instructions\000\000Max front or backend stalls per instruction\000\000\000\000\000\000001 */
+{ 131783 }, /* CPUs_utilized\000Default\000(software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@) / (duration_time * 1e9)\000\000Average CPU utilization\000\0001CPUs\000\000\000\000011 */
+{ 133100 }, /* backend_cycles_idle\000Default\000stalled\\-cycles\\-backend / cpu\\-cycles\000backend_cycles_idle > 0.2\000Backend stalls per cycle\000\000\000\000\000\000001 */
+{ 133402 }, /* branch_frequency\000Default\000branches / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Branches per CPU second\000\0001000M/sec\000\000\000\000011 */
+{ 133582 }, /* branch_miss_rate\000Default\000branch\\-misses / branches\000branch_miss_rate > 0.05\000Branch miss rate\000\000100%\000\000\000\000001 */
+{ 131969 }, /* cs_per_second\000Default\000software@context\\-switches\\,name\\=context\\-switches@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Context switches per CPU second\000\0001cs/sec\000\000\000\000011 */
+{ 133226 }, /* cycles_frequency\000Default\000cpu\\-cycles / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Cycles per CPU second\000\0001GHz\000\000\000\000011 */
+{ 134018 }, /* dtlb_miss_rate\000Default3\000dTLB\\-load\\-misses / dTLB\\-loads\000dtlb_miss_rate > 0.05\000dTLB miss rate\000\000100%\000\000\000\000001 */
+{ 132970 }, /* frontend_cycles_idle\000Default\000stalled\\-cycles\\-frontend / cpu\\-cycles\000frontend_cycles_idle > 0.1\000Frontend stalls per cycle\000\000\000\000\000\000001 */
+{ 132693 }, /* insn_per_cycle\000Default\000instructions / cpu\\-cycles\000insn_per_cycle < 1\000Instructions Per Cycle\000\0001instructions\000\000\000\000001 */
+{ 134124 }, /* itlb_miss_rate\000Default3\000iTLB\\-load\\-misses / iTLB\\-loads\000itlb_miss_rate > 0.05\000iTLB miss rate\000\000100%\000\000\000\000001 */
+{ 134230 }, /* l1_prefetch_miss_rate\000Default4\000L1\\-dcache\\-prefetch\\-misses / L1\\-dcache\\-prefetches\000l1_prefetch_miss_rate > 0.05\000L1 prefetch miss rate\000\000100%\000\000\000\000001 */
+{ 133686 }, /* l1d_miss_rate\000Default2\000L1\\-dcache\\-load\\-misses / L1\\-dcache\\-loads\000l1d_miss_rate > 0.05\000L1D miss rate\000\000100%\000\000\000\000001 */
+{ 133903 }, /* l1i_miss_rate\000Default3\000L1\\-icache\\-load\\-misses / L1\\-icache\\-loads\000l1i_miss_rate > 0.05\000L1I miss rate\000\000100%\000\000\000\000001 */
+{ 133802 }, /* llc_miss_rate\000Default2\000LLC\\-load\\-misses / LLC\\-loads\000llc_miss_rate > 0.05\000LLC miss rate\000\000100%\000\000\000\000001 */
+{ 132202 }, /* migrations_per_second\000Default\000software@cpu\\-migrations\\,name\\=cpu\\-migrations@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Process migrations to a new CPU per CPU second\000\0001migrations/sec\000\000\000\000011 */
+{ 132462 }, /* page_faults_per_second\000Default\000software@page\\-faults\\,name\\=page\\-faults@ * 1e9 / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)\000\000Page faults per CPU second\000\0001faults/sec\000\000\000\000011 */
+{ 132806 }, /* stalled_cycles_per_instruction\000Default\000max(stalled\\-cycles\\-frontend, stalled\\-cycles\\-backend) / instructions\000\000Max front or backend stalls per instruction\000\000\000\000\000\000001 */
};
@@ -2710,29 +2742,29 @@ static const struct pmu_table_entry pmu_metrics__common[] = {
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_default_core[] = {
-{ 129109 }, /* bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000\000\000\000 */
-{ 129171 }, /* bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000\000\000\000 */
-{ 129433 }, /* dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for any reason\000event=9,period=200000,umask=0x20\000\00000\000\000\000\000\000 */
-{ 129566 }, /* eist_trans\000other\000Number of Enhanced Intel SpeedStep(R) Technology (EIST) transitions\000event=0x3a,period=200000\000\00000\000\000\000\000\000 */
-{ 129233 }, /* l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000\000\000\000Attributable Level 3 cache access, read\000 */
-{ 129331 }, /* segment_reg_loads.any\000other\000Number of segment register loads\000event=6,period=200000,umask=0x80\000\00000\000\000\000\000\000 */
+{ 130230 }, /* bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000\000\000\000 */
+{ 130292 }, /* bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000\000\000\000 */
+{ 130554 }, /* dispatch_blocked.any\000other\000Memory cluster signals to block micro-op dispatch for any reason\000event=9,period=200000,umask=0x20\000\00000\000\000\000\000\000 */
+{ 130687 }, /* eist_trans\000other\000Number of Enhanced Intel SpeedStep(R) Technology (EIST) transitions\000event=0x3a,period=200000\000\00000\000\000\000\000\000 */
+{ 130354 }, /* l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000\000\000\000Attributable Level 3 cache access, read\000 */
+{ 130452 }, /* segment_reg_loads.any\000other\000Number of segment register loads\000event=6,period=200000,umask=0x80\000\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_hisi_sccl_ddrc[] = {
-{ 129699 }, /* uncore_hisi_ddrc.flux_wcmd\000uncore\000DDRC write commands\000event=2\000\00000\000\000\000\000\000 */
+{ 130820 }, /* uncore_hisi_ddrc.flux_wcmd\000uncore\000DDRC write commands\000event=2\000\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_hisi_sccl_l3c[] = {
-{ 130061 }, /* uncore_hisi_l3c.rd_hit_cpipe\000uncore\000Total read hits\000event=7\000\00000\000\000\000\000\000 */
+{ 131182 }, /* uncore_hisi_l3c.rd_hit_cpipe\000uncore\000Total read hits\000event=7\000\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_uncore_cbox[] = {
-{ 129935 }, /* event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000\000\000\000\000 */
-{ 129989 }, /* event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000\000\000\000\000 */
-{ 129781 }, /* unc_cbo_xsnp_response.miss_eviction\000uncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event=0x22,umask=0x81\000\00000\000\000\000\000\000 */
+{ 131056 }, /* event-hyphen\000uncore\000UNC_CBO_HYPHEN\000event=0xe0\000\00000\000\000\000\000\000 */
+{ 131110 }, /* event-two-hyph\000uncore\000UNC_CBO_TWO_HYPH\000event=0xc0\000\00000\000\000\000\000\000 */
+{ 130902 }, /* unc_cbo_xsnp_response.miss_eviction\000uncore\000A cross-core snoop resulted from L3 Eviction which misses in some processor core\000event=0x22,umask=0x81\000\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_uncore_imc[] = {
-{ 130244 }, /* uncore_imc.cache_hits\000uncore\000Total cache hits\000event=0x34\000\00000\000\000\000\000\000 */
+{ 131365 }, /* uncore_imc.cache_hits\000uncore\000Total cache hits\000event=0x34\000\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_cpu_uncore_imc_free_running[] = {
-{ 130153 }, /* uncore_imc_free_running.cache_miss\000uncore\000Total cache misses\000event=0x12\000\00000\000\000\000\000\000 */
+{ 131274 }, /* uncore_imc_free_running.cache_miss\000uncore\000Total cache misses\000event=0x12\000\00000\000\000\000\000\000 */
};
@@ -2745,46 +2777,46 @@ static const struct pmu_table_entry pmu_events__test_soc_cpu[] = {
{
.entries = pmu_events__test_soc_cpu_hisi_sccl_ddrc,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_cpu_hisi_sccl_ddrc),
- .pmu_name = { 129684 /* hisi_sccl,ddrc\000 */ },
+ .pmu_name = { 130805 /* hisi_sccl,ddrc\000 */ },
},
{
.entries = pmu_events__test_soc_cpu_hisi_sccl_l3c,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_cpu_hisi_sccl_l3c),
- .pmu_name = { 130047 /* hisi_sccl,l3c\000 */ },
+ .pmu_name = { 131168 /* hisi_sccl,l3c\000 */ },
},
{
.entries = pmu_events__test_soc_cpu_uncore_cbox,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_cpu_uncore_cbox),
- .pmu_name = { 129769 /* uncore_cbox\000 */ },
+ .pmu_name = { 130890 /* uncore_cbox\000 */ },
},
{
.entries = pmu_events__test_soc_cpu_uncore_imc,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_cpu_uncore_imc),
- .pmu_name = { 130233 /* uncore_imc\000 */ },
+ .pmu_name = { 131354 /* uncore_imc\000 */ },
},
{
.entries = pmu_events__test_soc_cpu_uncore_imc_free_running,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_cpu_uncore_imc_free_running),
- .pmu_name = { 130129 /* uncore_imc_free_running\000 */ },
+ .pmu_name = { 131250 /* uncore_imc_free_running\000 */ },
},
};
static const struct compact_pmu_event pmu_metrics__test_soc_cpu_default_core[] = {
-{ 133257 }, /* CPI\000\0001 / IPC\000\000\000\000\000\000\000\000000 */
-{ 133946 }, /* DCache_L2_All\000\000DCache_L2_All_Hits + DCache_L2_All_Miss\000\000\000\000\000\000\000\000000 */
-{ 133716 }, /* DCache_L2_All_Hits\000\000l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit\000\000\000\000\000\000\000\000000 */
-{ 133811 }, /* DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss\000\000\000\000\000\000\000\000000 */
-{ 134011 }, /* DCache_L2_Hits\000\000d_ratio(DCache_L2_All_Hits, DCache_L2_All)\000\000\000\000\000\000\000\000000 */
-{ 134080 }, /* DCache_L2_Misses\000\000d_ratio(DCache_L2_All_Miss, DCache_L2_All)\000\000\000\000\000\000\000\000000 */
-{ 133344 }, /* Frontend_Bound_SMT\000\000idq_uops_not_delivered.core / (4 * (cpu_clk_unhalted.thread / 2 * (1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk)))\000\000\000\000\000\000\000\000000 */
-{ 133280 }, /* IPC\000group1\000inst_retired.any / cpu_clk_unhalted.thread\000\000\000\000\000\000\000\000000 */
-{ 134218 }, /* L1D_Cache_Fill_BW\000\00064 * l1d.replacement / 1e9 / duration_time\000\000\000\000\000\000\000\000000 */
-{ 134151 }, /* M1\000\000ipc + M2\000\000\000\000\000\000\000\000000 */
-{ 134174 }, /* M2\000\000ipc + M1\000\000\000\000\000\000\000\000000 */
-{ 134197 }, /* M3\000\0001 / M3\000\000\000\000\000\000\000\000000 */
-{ 133644 }, /* cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\000000 */
-{ 133511 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000 */
-{ 133576 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000 */
+{ 134378 }, /* CPI\000\0001 / IPC\000\000\000\000\000\000\000\000000 */
+{ 135067 }, /* DCache_L2_All\000\000DCache_L2_All_Hits + DCache_L2_All_Miss\000\000\000\000\000\000\000\000000 */
+{ 134837 }, /* DCache_L2_All_Hits\000\000l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit\000\000\000\000\000\000\000\000000 */
+{ 134932 }, /* DCache_L2_All_Miss\000\000max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss\000\000\000\000\000\000\000\000000 */
+{ 135132 }, /* DCache_L2_Hits\000\000d_ratio(DCache_L2_All_Hits, DCache_L2_All)\000\000\000\000\000\000\000\000000 */
+{ 135201 }, /* DCache_L2_Misses\000\000d_ratio(DCache_L2_All_Miss, DCache_L2_All)\000\000\000\000\000\000\000\000000 */
+{ 134465 }, /* Frontend_Bound_SMT\000\000idq_uops_not_delivered.core / (4 * (cpu_clk_unhalted.thread / 2 * (1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk)))\000\000\000\000\000\000\000\000000 */
+{ 134401 }, /* IPC\000group1\000inst_retired.any / cpu_clk_unhalted.thread\000\000\000\000\000\000\000\000000 */
+{ 135339 }, /* L1D_Cache_Fill_BW\000\00064 * l1d.replacement / 1e9 / duration_time\000\000\000\000\000\000\000\000000 */
+{ 135272 }, /* M1\000\000ipc + M2\000\000\000\000\000\000\000\000000 */
+{ 135295 }, /* M2\000\000ipc + M1\000\000\000\000\000\000\000\000000 */
+{ 135318 }, /* M3\000\0001 / M3\000\000\000\000\000\000\000\000000 */
+{ 134765 }, /* cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\000000 */
+{ 134632 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000 */
+{ 134697 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\000000 */
};
@@ -2797,13 +2829,13 @@ static const struct pmu_table_entry pmu_metrics__test_soc_cpu[] = {
};
static const struct compact_pmu_event pmu_events__test_soc_sys_uncore_sys_ccn_pmu[] = {
-{ 130423 }, /* sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\00000\000\000\000\000\000 */
+{ 131544 }, /* sys_ccn_pmu.read_cycles\000uncore\000ccn read-cycles event\000config=0x2c\0000x01\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_sys_uncore_sys_cmn_pmu[] = {
-{ 130519 }, /* sys_cmn_pmu.hnf_cache_miss\000uncore\000Counts total cache misses in first lookup result (high priority)\000eventid=1,type=5\000(434|436|43c|43a).*\00000\000\000\000\000\000 */
+{ 131640 }, /* sys_cmn_pmu.hnf_cache_miss\000uncore\000Counts total cache misses in first lookup result (high priority)\000eventid=1,type=5\000(434|436|43c|43a).*\00000\000\000\000\000\000 */
};
static const struct compact_pmu_event pmu_events__test_soc_sys_uncore_sys_ddr_pmu[] = {
-{ 130328 }, /* sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000\000\000\000\000\000 */
+{ 131449 }, /* sys_ddr_pmu.write_cycles\000uncore\000ddr write-cycles event\000event=0x2b\000v8\00000\000\000\000\000\000 */
};
@@ -2811,17 +2843,17 @@ static const struct pmu_table_entry pmu_events__test_soc_sys[] = {
{
.entries = pmu_events__test_soc_sys_uncore_sys_ccn_pmu,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_sys_uncore_sys_ccn_pmu),
- .pmu_name = { 130404 /* uncore_sys_ccn_pmu\000 */ },
+ .pmu_name = { 131525 /* uncore_sys_ccn_pmu\000 */ },
},
{
.entries = pmu_events__test_soc_sys_uncore_sys_cmn_pmu,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_sys_uncore_sys_cmn_pmu),
- .pmu_name = { 130500 /* uncore_sys_cmn_pmu\000 */ },
+ .pmu_name = { 131621 /* uncore_sys_cmn_pmu\000 */ },
},
{
.entries = pmu_events__test_soc_sys_uncore_sys_ddr_pmu,
.num_entries = ARRAY_SIZE(pmu_events__test_soc_sys_uncore_sys_ddr_pmu),
- .pmu_name = { 130309 /* uncore_sys_ddr_pmu\000 */ },
+ .pmu_name = { 131430 /* uncore_sys_ddr_pmu\000 */ },
},
};
diff --git a/tools/perf/util/tool_pmu.c b/tools/perf/util/tool_pmu.c
index 2d1f244264dd..52d8188efc5e 100644
--- a/tools/perf/util/tool_pmu.c
+++ b/tools/perf/util/tool_pmu.c
@@ -66,6 +66,22 @@ static const char *const tool_pmu__event_names[TOOL_PMU__EVENT_MAX] = {
"memory_swap_pss",
"memory_text",
"memory_uss",
+ "net_rx_bytes",
+ "net_rx_packets",
+ "net_rx_errors",
+ "net_rx_drop",
+ "net_rx_fifo",
+ "net_rx_frame",
+ "net_rx_compressed",
+ "net_rx_multicast",
+ "net_tx_bytes",
+ "net_tx_packets",
+ "net_tx_errors",
+ "net_tx_drop",
+ "net_tx_fifo",
+ "net_tx_colls",
+ "net_tx_carrier",
+ "net_tx_compressed",
};
bool tool_pmu__skip_event(const char *name __maybe_unused)
@@ -297,6 +313,22 @@ static const char *tool_pmu__memory_event_to_key(enum tool_pmu_event ev)
case TOOL_PMU__EVENT_MEMORY_SIZE:
case TOOL_PMU__EVENT_MEMORY_TEXT:
case TOOL_PMU__EVENT_MEMORY_USS:
+ case TOOL_PMU__EVENT_NET_RX_BYTES:
+ case TOOL_PMU__EVENT_NET_RX_PACKETS:
+ case TOOL_PMU__EVENT_NET_RX_ERRORS:
+ case TOOL_PMU__EVENT_NET_RX_DROP:
+ case TOOL_PMU__EVENT_NET_RX_FIFO:
+ case TOOL_PMU__EVENT_NET_RX_FRAME:
+ case TOOL_PMU__EVENT_NET_RX_COMPRESSED:
+ case TOOL_PMU__EVENT_NET_RX_MULTICAST:
+ case TOOL_PMU__EVENT_NET_TX_BYTES:
+ case TOOL_PMU__EVENT_NET_TX_PACKETS:
+ case TOOL_PMU__EVENT_NET_TX_ERRORS:
+ case TOOL_PMU__EVENT_NET_TX_DROP:
+ case TOOL_PMU__EVENT_NET_TX_FIFO:
+ case TOOL_PMU__EVENT_NET_TX_COLLS:
+ case TOOL_PMU__EVENT_NET_TX_CARRIER:
+ case TOOL_PMU__EVENT_NET_TX_COMPRESSED:
case TOOL_PMU__EVENT_DURATION_TIME:
case TOOL_PMU__EVENT_USER_TIME:
case TOOL_PMU__EVENT_SYSTEM_TIME:
@@ -435,6 +467,68 @@ static int read_statm(int fd, enum tool_pmu_event ev, u64 *val)
return -EINVAL;
}
+static bool tool_pmu__is_net_event(enum tool_pmu_event ev)
+{
+ return ev >= TOOL_PMU__EVENT_NET_RX_BYTES &&
+ ev <= TOOL_PMU__EVENT_NET_TX_COMPRESSED;
+}
+
+static int read_net_dev(int fd, enum tool_pmu_event ev, u64 *val)
+{
+ struct io io;
+ char buf[4096];
+ int i;
+ int index = ev - TOOL_PMU__EVENT_NET_RX_BYTES;
+
+ io__init(&io, fd, buf, sizeof(buf));
+ lseek(fd, 0, SEEK_SET);
+
+ /*
+ * Drop first two lines of:
+ * Inter-| Receive | Transmit
+ * face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ */
+ if (!read_until_char(&io, '\n'))
+ return -EINVAL;
+ if (!read_until_char(&io, '\n'))
+ return -EINVAL;
+
+ *val = 0;
+ while (true) {
+ int ch = io__get_char(&io);
+ __u64 read_val;
+
+ /* First read interface name, such as " lo:" */
+ if (ch == -1)
+ break;
+ while (ch == ' ')
+ ch = io__get_char(&io);
+ if (ch == -1)
+ break;
+ while (ch != ':' && ch != -1 && ch != '\n')
+ ch = io__get_char(&io);
+ if (ch != ':') {
+ if (ch == '\n')
+ continue;
+ if (ch == -1)
+ return 0; /* Assume EOF. */
+ read_until_char(&io, '\n');
+ continue;
+ }
+ /* Ignore columns before one being read. */
+ for (i = 0; i < index; i++) {
+ if (io__get_dec(&io, &read_val) == -1)
+ return 0; /* Assume EOF. */
+ }
+ /* Read actually value. */
+ if (io__get_dec(&io, &read_val) != -1)
+ *val += read_val;
+ /* Move to the next line. */
+ read_until_char(&io, '\n');
+ }
+ return 0;
+}
+
int evsel__tool_pmu_prepare_open(struct evsel *evsel,
struct perf_cpu_map *cpus,
int nthreads)
@@ -517,26 +611,36 @@ int evsel__tool_pmu_open(struct evsel *evsel,
}
if (err)
goto out_close;
- } else if (tool_pmu__is_memory_event(ev)) {
+ } else if (tool_pmu__is_memory_event(ev) ||
+ tool_pmu__is_net_event(ev)) {
+ char buf[PATH_MAX];
int fd = -1;
if (pid > -1) {
- char buf[PATH_MAX];
-
if (tool_pmu__is_memory_statm_event(ev)) {
snprintf(buf, sizeof(buf), "%s/%d/statm",
procfs__mountpoint(), pid);
+ } else if (tool_pmu__is_net_event(ev)) {
+ snprintf(buf, sizeof(buf), "%s/%d/net/dev",
+ procfs__mountpoint(), pid);
} else {
snprintf(buf, sizeof(buf), "%s/%d/smaps_rollup",
procfs__mountpoint(), pid);
}
fd = open(buf, O_RDONLY);
}
+ if (pid == -1 && tool_pmu__is_net_event(ev)) {
+ /* Read /proc/net/dev that already aggregates the counts. */
+ snprintf(buf, sizeof(buf), "%s/net/dev",
+ procfs__mountpoint());
+ fd = open(buf, O_RDONLY);
+ }
/*
- * For system-wide (pid == -1), we don't open a file here.
- * We will aggregate in read().
+ * For memory event system-wide (pid == -1), we
+ * don't open a file here. We will aggregate in
+ * read().
*/
- if (pid > -1 && fd < 0) {
+ if ((pid > -1 || tool_pmu__is_net_event(ev)) && fd < 0) {
err = -errno;
goto out_close;
}
@@ -723,6 +827,22 @@ bool tool_pmu__read_event(enum tool_pmu_event ev,
case TOOL_PMU__EVENT_MEMORY_LOCKED:
case TOOL_PMU__EVENT_MEMORY_DATA:
case TOOL_PMU__EVENT_MEMORY_TEXT:
+ case TOOL_PMU__EVENT_NET_RX_BYTES:
+ case TOOL_PMU__EVENT_NET_RX_PACKETS:
+ case TOOL_PMU__EVENT_NET_RX_ERRORS:
+ case TOOL_PMU__EVENT_NET_RX_DROP:
+ case TOOL_PMU__EVENT_NET_RX_FIFO:
+ case TOOL_PMU__EVENT_NET_RX_FRAME:
+ case TOOL_PMU__EVENT_NET_RX_COMPRESSED:
+ case TOOL_PMU__EVENT_NET_RX_MULTICAST:
+ case TOOL_PMU__EVENT_NET_TX_BYTES:
+ case TOOL_PMU__EVENT_NET_TX_PACKETS:
+ case TOOL_PMU__EVENT_NET_TX_ERRORS:
+ case TOOL_PMU__EVENT_NET_TX_DROP:
+ case TOOL_PMU__EVENT_NET_TX_FIFO:
+ case TOOL_PMU__EVENT_NET_TX_COLLS:
+ case TOOL_PMU__EVENT_NET_TX_CARRIER:
+ case TOOL_PMU__EVENT_NET_TX_COMPRESSED:
case TOOL_PMU__EVENT_NONE:
case TOOL_PMU__EVENT_DURATION_TIME:
case TOOL_PMU__EVENT_USER_TIME:
@@ -905,16 +1025,34 @@ int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
case TOOL_PMU__EVENT_MEMORY_PRIVATE_HUGETLB:
case TOOL_PMU__EVENT_MEMORY_LOCKED:
case TOOL_PMU__EVENT_MEMORY_DATA:
- case TOOL_PMU__EVENT_MEMORY_TEXT: {
+ case TOOL_PMU__EVENT_MEMORY_TEXT:
+ case TOOL_PMU__EVENT_NET_RX_BYTES:
+ case TOOL_PMU__EVENT_NET_RX_PACKETS:
+ case TOOL_PMU__EVENT_NET_RX_ERRORS:
+ case TOOL_PMU__EVENT_NET_RX_DROP:
+ case TOOL_PMU__EVENT_NET_RX_FIFO:
+ case TOOL_PMU__EVENT_NET_RX_FRAME:
+ case TOOL_PMU__EVENT_NET_RX_COMPRESSED:
+ case TOOL_PMU__EVENT_NET_RX_MULTICAST:
+ case TOOL_PMU__EVENT_NET_TX_BYTES:
+ case TOOL_PMU__EVENT_NET_TX_PACKETS:
+ case TOOL_PMU__EVENT_NET_TX_ERRORS:
+ case TOOL_PMU__EVENT_NET_TX_DROP:
+ case TOOL_PMU__EVENT_NET_TX_FIFO:
+ case TOOL_PMU__EVENT_NET_TX_COLLS:
+ case TOOL_PMU__EVENT_NET_TX_CARRIER:
+ case TOOL_PMU__EVENT_NET_TX_COMPRESSED: {
int fd = FD(evsel, cpu_map_idx, thread);
u64 val = 0;
if (fd >= 0) {
- /* Per-process */
+ /* Per-process or system-wide net. */
int ret;
if (tool_pmu__is_memory_statm_event(ev))
ret = read_statm(fd, ev, &val);
+ else if (tool_pmu__is_net_event(ev))
+ ret = read_net_dev(fd, ev, &val);
else
ret = read_smaps_rollup(fd, ev, &val);
@@ -923,6 +1061,7 @@ int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread)
} else {
/* System-wide aggregation */
if (cpu_map_idx == 0 && thread == 0) {
+ assert(tool_pmu__is_memory_event(ev));
tool_pmu__aggregate_memory_event(ev, &val);
}
}
diff --git a/tools/perf/util/tool_pmu.h b/tools/perf/util/tool_pmu.h
index bf6bb196ad75..be8ebd9aacfb 100644
--- a/tools/perf/util/tool_pmu.h
+++ b/tools/perf/util/tool_pmu.h
@@ -52,6 +52,22 @@ enum tool_pmu_event {
TOOL_PMU__EVENT_MEMORY_SWAP_PSS,
TOOL_PMU__EVENT_MEMORY_TEXT,
TOOL_PMU__EVENT_MEMORY_USS,
+ TOOL_PMU__EVENT_NET_RX_BYTES,
+ TOOL_PMU__EVENT_NET_RX_PACKETS,
+ TOOL_PMU__EVENT_NET_RX_ERRORS,
+ TOOL_PMU__EVENT_NET_RX_DROP,
+ TOOL_PMU__EVENT_NET_RX_FIFO,
+ TOOL_PMU__EVENT_NET_RX_FRAME,
+ TOOL_PMU__EVENT_NET_RX_COMPRESSED,
+ TOOL_PMU__EVENT_NET_RX_MULTICAST,
+ TOOL_PMU__EVENT_NET_TX_BYTES,
+ TOOL_PMU__EVENT_NET_TX_PACKETS,
+ TOOL_PMU__EVENT_NET_TX_ERRORS,
+ TOOL_PMU__EVENT_NET_TX_DROP,
+ TOOL_PMU__EVENT_NET_TX_FIFO,
+ TOOL_PMU__EVENT_NET_TX_COLLS,
+ TOOL_PMU__EVENT_NET_TX_CARRIER,
+ TOOL_PMU__EVENT_NET_TX_COMPRESSED,
TOOL_PMU__EVENT_MAX,
};
--
2.52.0.351.gbe84eed79e-goog
© 2016 - 2026 Red Hat, Inc.