Metrics

Thee who watches the watchers

notes

  • most profilers require frame pointers, almost all require debug information(can store seperately)
  • sudo scx_lavd --performance for latency aware scheduler (gpu/drm is wip)
  • monitoring
  • profilers
  • perforator
    • record flamegraph and compare (ebpf collection)
  • trace-cmd
trace-cmd record -i \
    -e "sched:sched_switch" \
    -e "sched:sched_process_exec" \
    -e "sched:sched_process_fork" \
    -e "sched:sched_process_exit" \
    -e "amdgpu:amdgpu_vm_flush" \
    -e "amdgpu:amdgpu_cs_ioctl" \
    -e "amdgpu:amdgpu_sched_run_job" \
    -e "*fence:*fence_signaled" \
    -e "drm:drm_vblank_event" \
    -e "drm:drm_vblank_event_queued" \
    -e "i915:i915_flip_request" \
    -e "i915:i915_flip_complete" \
    -e "i915:intel_gpu_freq_change" \
    -e "i915:i915_gem_request_add" \
    -e "i915:i915_gem_request_submit" \
    -e "i915:i915_gem_request_in" \
    -e "i915:i915_gem_request_out" \
    -e "i915:intel_engine_notify" \
    -e "i915:i915_gem_request_wait_begin" \
    -e "i915:i915_gem_request_wait_end" \
    sleep 4
discovery.process "all" {}

discovery.relabel "btm" {
    targets = discovery.process.all.targets
    // Filter needed processes
    rule {
        source_labels = ["__meta_process_exe"]
        regex = ".*/btm"
        action = "keep"
    }
     // provide arbitrary service_name label, otherwise it will be "unspecified"
    rule {
        source_labels = ["__meta_process_exe"]
        target_label = "service_name"
        regex = ".*/btm"
        action = "replace"
        replacement = "bottom"
    }
}
pyroscope.ebpf "instance" {
    demangle = "full"
    off_cpu_threshold = 1
    forward_to = [pyroscope.write.endpoint.receiver]
    targets = discovery.relabel.btm.output
}

pyroscope.write "endpoint" {
    endpoint {
        url = "http://localhost:4040"
    }
}