mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-18 06:20:51 +00:00
Moved events' comments to the definitions file
This commit is contained in:
parent
ce49b1aff7
commit
ca7b5a3a05
@ -178,16 +178,16 @@
|
|||||||
M(OSReadChars, "Number of bytes read from filesystem, including page cache.") \
|
M(OSReadChars, "Number of bytes read from filesystem, including page cache.") \
|
||||||
M(OSWriteChars, "Number of bytes written to filesystem, including page cache.") \
|
M(OSWriteChars, "Number of bytes written to filesystem, including page cache.") \
|
||||||
\
|
\
|
||||||
M(PERF_COUNT_HW_CPU_CYCLES, "") \
|
M(PERF_COUNT_HW_CPU_CYCLES, "Total cycles. Be wary of what happens during CPU frequency scaling.") \
|
||||||
M(PERF_COUNT_HW_INSTRUCTIONS, "") \
|
M(PERF_COUNT_HW_INSTRUCTIONS, "Retired instructions. Be careful, these can be affected by various issues, most notably hardware interrupt counts.") \
|
||||||
M(PERF_COUNT_HW_CACHE_REFERENCES, "") \
|
M(PERF_COUNT_HW_CACHE_REFERENCES, "Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU. This may include prefetches and coherency messages; again this depends on the design of your CPU.") \
|
||||||
M(PERF_COUNT_HW_CACHE_MISSES, "") \
|
M(PERF_COUNT_HW_CACHE_MISSES, "Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in con‐junction with the PERF_COUNT_HW_CACHE_REFERENCES event to calculate cache miss rates.") \
|
||||||
M(PERF_COUNT_HW_BRANCH_INSTRUCTIONS, "") \
|
M(PERF_COUNT_HW_BRANCH_INSTRUCTIONS, "Retired branch instructions. Prior to Linux 2.6.35, this used the wrong event on AMD processors.") \
|
||||||
M(PERF_COUNT_HW_BRANCH_MISSES, "") \
|
M(PERF_COUNT_HW_BRANCH_MISSES, "Mispredicted branch instructions.") \
|
||||||
M(PERF_COUNT_HW_BUS_CYCLES, "") \
|
M(PERF_COUNT_HW_BUS_CYCLES, "Bus cycles, which can be different from total cycles.") \
|
||||||
M(PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, "") \
|
M(PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, "Stalled cycles during issue.") \
|
||||||
M(PERF_COUNT_HW_STALLED_CYCLES_BACKEND, "") \
|
M(PERF_COUNT_HW_STALLED_CYCLES_BACKEND, "Stalled cycles during retirement.") \
|
||||||
M(PERF_COUNT_HW_REF_CPU_CYCLES, "") \
|
M(PERF_COUNT_HW_REF_CPU_CYCLES, "Total cycles; not affected by CPU frequency scaling.") \
|
||||||
\
|
\
|
||||||
M(PERF_COUNT_SW_TASK_CLOCK, "A clock count specific to the task that is running") \
|
M(PERF_COUNT_SW_TASK_CLOCK, "A clock count specific to the task that is running") \
|
||||||
M(PERF_COUNT_SW_PAGE_FAULTS, "Number of page faults") \
|
M(PERF_COUNT_SW_PAGE_FAULTS, "Number of page faults") \
|
||||||
|
@ -34,54 +34,27 @@ namespace DB {
|
|||||||
|
|
||||||
// descriptions' source: http://man7.org/linux/man-pages/man2/perf_event_open.2.html
|
// descriptions' source: http://man7.org/linux/man-pages/man2/perf_event_open.2.html
|
||||||
const PerfEventInfo PerfEventsCounters::perf_raw_events_info[] = {
|
const PerfEventInfo PerfEventsCounters::perf_raw_events_info[] = {
|
||||||
|
|
||||||
// Total cycles. Be wary of what happens during CPU frequency scaling.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_CPU_CYCLES, ProfileEvents::PERF_COUNT_HW_CPU_CYCLES),
|
hardwareEvent(PERF_COUNT_HW_CPU_CYCLES, ProfileEvents::PERF_COUNT_HW_CPU_CYCLES),
|
||||||
// Retired instructions. Be careful, these can be affected by various issues, most notably hardware
|
|
||||||
// interrupt counts.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_INSTRUCTIONS, ProfileEvents::PERF_COUNT_HW_INSTRUCTIONS),
|
hardwareEvent(PERF_COUNT_HW_INSTRUCTIONS, ProfileEvents::PERF_COUNT_HW_INSTRUCTIONS),
|
||||||
// Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU.
|
|
||||||
// This may include prefetches and coherency messages; again this depends on the design of your CPU.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_CACHE_REFERENCES, ProfileEvents::PERF_COUNT_HW_CACHE_REFERENCES),
|
hardwareEvent(PERF_COUNT_HW_CACHE_REFERENCES, ProfileEvents::PERF_COUNT_HW_CACHE_REFERENCES),
|
||||||
// Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in con‐junction
|
|
||||||
// with the PERF_COUNT_HW_CACHE_REFERENCES event to calculate cache miss rates.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_CACHE_MISSES, ProfileEvents::PERF_COUNT_HW_CACHE_MISSES),
|
hardwareEvent(PERF_COUNT_HW_CACHE_MISSES, ProfileEvents::PERF_COUNT_HW_CACHE_MISSES),
|
||||||
// Retired branch instructions. Prior to Linux 2.6.35, this used the wrong event on AMD processors.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_BRANCH_INSTRUCTIONS, ProfileEvents::PERF_COUNT_HW_BRANCH_INSTRUCTIONS),
|
hardwareEvent(PERF_COUNT_HW_BRANCH_INSTRUCTIONS, ProfileEvents::PERF_COUNT_HW_BRANCH_INSTRUCTIONS),
|
||||||
// Mispredicted branch instructions.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_BRANCH_MISSES, ProfileEvents::PERF_COUNT_HW_BRANCH_MISSES),
|
hardwareEvent(PERF_COUNT_HW_BRANCH_MISSES, ProfileEvents::PERF_COUNT_HW_BRANCH_MISSES),
|
||||||
// Bus cycles, which can be different from total cycles.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_BUS_CYCLES, ProfileEvents::PERF_COUNT_HW_BUS_CYCLES),
|
hardwareEvent(PERF_COUNT_HW_BUS_CYCLES, ProfileEvents::PERF_COUNT_HW_BUS_CYCLES),
|
||||||
// Stalled cycles during issue.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, ProfileEvents::PERF_COUNT_HW_STALLED_CYCLES_FRONTEND),
|
hardwareEvent(PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, ProfileEvents::PERF_COUNT_HW_STALLED_CYCLES_FRONTEND),
|
||||||
// Stalled cycles during retirement.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_STALLED_CYCLES_BACKEND, ProfileEvents::PERF_COUNT_HW_STALLED_CYCLES_BACKEND),
|
hardwareEvent(PERF_COUNT_HW_STALLED_CYCLES_BACKEND, ProfileEvents::PERF_COUNT_HW_STALLED_CYCLES_BACKEND),
|
||||||
// Total cycles; not affected by CPU frequency scaling.
|
|
||||||
hardwareEvent(PERF_COUNT_HW_REF_CPU_CYCLES, ProfileEvents::PERF_COUNT_HW_REF_CPU_CYCLES),
|
hardwareEvent(PERF_COUNT_HW_REF_CPU_CYCLES, ProfileEvents::PERF_COUNT_HW_REF_CPU_CYCLES),
|
||||||
|
|
||||||
// This reports the CPU clock, a high-resolution per-CPU timer.
|
// This reports the CPU clock, a high-resolution per-CPU timer.
|
||||||
// a bit broken according to this: https://stackoverflow.com/a/56967896
|
// a bit broken according to this: https://stackoverflow.com/a/56967896
|
||||||
// makeInfo(perf_type_id::PERF_TYPE_SOFTWARE, perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK, ProfileEvents::PERF_COUNT_SW_CPU_CLOCK),
|
// makeInfo(perf_type_id::PERF_TYPE_SOFTWARE, perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK, ProfileEvents::PERF_COUNT_SW_CPU_CLOCK),
|
||||||
// This reports a clock count specific to the task that is running.
|
|
||||||
softwareEvent(PERF_COUNT_SW_TASK_CLOCK, ProfileEvents::PERF_COUNT_SW_TASK_CLOCK),
|
softwareEvent(PERF_COUNT_SW_TASK_CLOCK, ProfileEvents::PERF_COUNT_SW_TASK_CLOCK),
|
||||||
// This reports the number of page faults.
|
|
||||||
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS),
|
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS),
|
||||||
// This counts context switches.
|
|
||||||
// Until Linux 2.6.34, these were all reported as user-space events,
|
|
||||||
// after that they are reported as happening in the kernel
|
|
||||||
softwareEvent(PERF_COUNT_SW_CONTEXT_SWITCHES, ProfileEvents::PERF_COUNT_SW_CONTEXT_SWITCHES),
|
softwareEvent(PERF_COUNT_SW_CONTEXT_SWITCHES, ProfileEvents::PERF_COUNT_SW_CONTEXT_SWITCHES),
|
||||||
// This reports the number of times the process has migrated to a new CPU.
|
|
||||||
softwareEvent(PERF_COUNT_SW_CPU_MIGRATIONS, ProfileEvents::PERF_COUNT_SW_CPU_MIGRATIONS),
|
softwareEvent(PERF_COUNT_SW_CPU_MIGRATIONS, ProfileEvents::PERF_COUNT_SW_CPU_MIGRATIONS),
|
||||||
// This counts the number of minor page faults. These did not require disk I/O to handle.
|
|
||||||
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS_MIN, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS_MIN),
|
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS_MIN, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS_MIN),
|
||||||
// This counts the number of major page faults. These required disk I/O to handle.
|
|
||||||
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS_MAJ, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS_MAJ),
|
softwareEvent(PERF_COUNT_SW_PAGE_FAULTS_MAJ, ProfileEvents::PERF_COUNT_SW_PAGE_FAULTS_MAJ),
|
||||||
// This counts the number of alignment faults. These happen when unaligned memory accesses happen;
|
|
||||||
// the kernel can handle these but it reduces performance.
|
|
||||||
// This happens only on some architectures (never on x86).
|
|
||||||
softwareEvent(PERF_COUNT_SW_ALIGNMENT_FAULTS, ProfileEvents::PERF_COUNT_SW_ALIGNMENT_FAULTS),
|
softwareEvent(PERF_COUNT_SW_ALIGNMENT_FAULTS, ProfileEvents::PERF_COUNT_SW_ALIGNMENT_FAULTS),
|
||||||
// This counts the number of emulation faults. The kernel sometimes traps on unimplemented instructions and
|
|
||||||
// emulates them for user space. This can negatively impact performance.
|
|
||||||
softwareEvent(PERF_COUNT_SW_EMULATION_FAULTS, ProfileEvents::PERF_COUNT_SW_EMULATION_FAULTS)
|
softwareEvent(PERF_COUNT_SW_EMULATION_FAULTS, ProfileEvents::PERF_COUNT_SW_EMULATION_FAULTS)
|
||||||
// This is a placeholder event that counts nothing. Informational sample record types such as mmap or
|
// This is a placeholder event that counts nothing. Informational sample record types such as mmap or
|
||||||
// comm must be associated with an active event. This dummy event allows gathering such records
|
// comm must be associated with an active event. This dummy event allows gathering such records
|
||||||
|
Loading…
Reference in New Issue
Block a user