实际上,perfctl 是一个寄存器组,起始地址为 0C1H,可以通过 IA32_PMCx 读出一个 generic PMC 的数值(本文采用与内核相同的方式,使用 RDPMC 指令,而不是从 IA32_PMCx 中读取)。 num_counters:generic PMC 数量。 num_counters_fixed:fixed PMC 数量。 cntval_bits:PMC 数据读出宽度。不同 PMU 实现,其 PMC ...
实际上,perfctl 是一个寄存器组,起始地址为 0C1H,可以通过 IA32_PMCx 读出一个 generic PMC 的数值(本文采用与内核相同的方式,使用 RDPMC 指令,而不是从 IA32_PMCx 中读取)。 num_counters:generic PMC 数量。 num_counters_fixed:fixed PMC 数量。 cntval_bits:PMC 数据读出宽度。不同 PMU 实现,其 PMC ...
for (idx = 0; idx < x86_pmu.num_counters; idx++) { if (!test_bit(idx, cpuc->active_mask)) continue; event = cpuc->events[idx]; val = x86_perf_event_update(event); if (val & (1ULL << (x86_pmu.cntval_bits - 1))) continue; /* * event overflow */ handled++; perf...
unconstrained = (struct event_constraint) __EVENT_CONSTRAINT(0, (1ULL << x86_pmu.num_counters) - 1, 0, x86_pmu.num_counters, 0, 0); 下面再来看下,sys_perf_event_open传递进来的参数是怎么体现事件的 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ...
typedef struct _PERF_DATA_HEADER { ULONG dwTotalSize; ULONG dwNumCounters; LONGLONG PerfTimeStamp; LONGLONG PerfTime100NSec; LONGLONG PerfFreq; SYSTEMTIME SystemTime; } PERF_DATA_HEADER, *PPERF_DATA_HEADER; 成员dwTotalSizePERF_DATA_HEADER 结构的大小和 PERF_DATA_HEADER 块中所有 PERF_COUNTER_HEAD...
typedefstruct_PERF_COUNTERSET_INFO{GUID CounterSetGuid; GUID ProviderGuid; ULONG NumCounters; ULONG InstanceType; } PERF_COUNTERSET_INFO, *PPERF_COUNTERSET_INFO; 成员 CounterSetGuid 唯一标识计数器集的 GUID。counterSet元素的guid属性包含 GUID。
pmu) return -ENOMEM; num_counters = pmu_sbi_find_num_ctrs(); if (num_counters < 0) { pr_err("SBI PMU extension doesn't provide any counters\n"); goto out_free; } /* cache all the information about counters now */ if (pmu_sbi_get_ctrinfo(num_counters)) ...
-B, --big-num print large numbers with thousands' separators -C, --cpu <cpu> list of cpus to monitor in system-wide -c, --scale scale/normalize counters -D, --delay <n> ms to wait before starting measurement after program s
* If perfmon_offset or num_counters is 0, it means perfmon is * not supported on this hardware. Expand Down Expand Up @@ -624,11 +552,6 @@ int perfmon_pmu_init(struct idxd_device *idxd) if (rc) goto free; rc = cpuhp_state_add_instance(cpuhp_slot, &idxd_pmu->cpuhp_node)...
-B, --big-numprintlarge numbers with thousands' separators -C, --cpu <cpu> list of cpus to monitor in system-wide -c, --scale scale/normalize counters -D, --delay <n> ms to wait before starting measurement after program s -d, --detailed detailed run - start a lot of events ...