tools/perf/pmu-events/arch/common/common/metrics.json

Source file repositories/reference/linux-study-clean/tools/perf/pmu-events/arch/common/common/metrics.json

File Facts

System
Linux kernel
Corpus path
tools/perf/pmu-events/arch/common/common/metrics.json
Extension
.json
Size
6471 bytes
Lines
152
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

[
    {
        "BriefDescription": "Average CPU utilization",
        "MetricExpr": "(software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@) / (duration_time * 1e9)",
        "MetricGroup": "Default",
        "MetricName": "CPUs_utilized",
        "ScaleUnit": "1CPUs",
        "MetricConstraint": "NO_GROUP_EVENTS",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Context switches per CPU second",
        "MetricExpr": "(software@context\\-switches\\,name\\=context\\-switches@ * 1e9) / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)",
        "MetricGroup": "Default",
        "MetricName": "cs_per_second",
        "ScaleUnit": "1cs/sec",
        "MetricConstraint": "NO_GROUP_EVENTS",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Process migrations to a new CPU per CPU second",
        "MetricExpr": "(software@cpu\\-migrations\\,name\\=cpu\\-migrations@ * 1e9) / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)",
        "MetricGroup": "Default",
        "MetricName": "migrations_per_second",
        "ScaleUnit": "1migrations/sec",
        "MetricConstraint": "NO_GROUP_EVENTS",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Page faults per CPU second",
        "MetricExpr": "(software@page\\-faults\\,name\\=page\\-faults@ * 1e9) / (software@cpu\\-clock\\,name\\=cpu\\-clock@ if #target_cpu else software@task\\-clock\\,name\\=task\\-clock@)",
        "MetricGroup": "Default",
        "MetricName": "page_faults_per_second",
        "ScaleUnit": "1faults/sec",
        "MetricConstraint": "NO_GROUP_EVENTS",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Instructions Per Cycle",
        "MetricExpr": "instructions / cpu\\-cycles",
        "MetricGroup": "Default",
        "MetricName": "insn_per_cycle",
        "MetricThreshold": "insn_per_cycle < 1",
        "ScaleUnit": "1instructions",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Max front or backend stalls per instruction",
        "MetricExpr": "(max(stalled\\-cycles\\-frontend, stalled\\-cycles\\-backend) / instructions) if (has_event(stalled\\-cycles\\-frontend) & has_event(stalled\\-cycles\\-backend)) else ((stalled\\-cycles\\-frontend / instructions) if has_event(stalled\\-cycles\\-frontend) else ((stalled\\-cycles\\-backend / instructions) if has_event(stalled\\-cycles\\-backend) else 0))",
        "MetricGroup": "Default",
        "MetricName": "stalled_cycles_per_instruction",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Frontend stalls per cycle",
        "MetricExpr": "(stalled\\-cycles\\-frontend / cpu\\-cycles) if has_event(stalled\\-cycles\\-frontend) else 0",
        "MetricGroup": "Default",
        "MetricName": "frontend_cycles_idle",
        "MetricThreshold": "frontend_cycles_idle > 0.1",
        "DefaultShowEvents": "1"
    },
    {
        "BriefDescription": "Backend stalls per cycle",
        "MetricExpr": "(stalled\\-cycles\\-backend / cpu\\-cycles) if has_event(stalled\\-cycles\\-backend) else 0",
        "MetricGroup": "Default",
        "MetricName": "backend_cycles_idle",
        "MetricThreshold": "backend_cycles_idle > 0.2",
        "DefaultShowEvents": "1"
    },
    {

Annotation

Implementation Notes