Conversation
Single mode (-s) previously emitted only exit-time latency histograms.
Extend the single-probe uprobe_log_op_stats_v2 to capture and print one
line per op with the target pg id, object name, decoded osd op list
(including cls calls), client id, tid and total latency, while keeping
the histograms:
osd 0 pg 1.11 op_w size 4096 client 4446 tid 8 \
object benchmark_data_..._object7 \
osd_ops [set-alloc-hint,write] op_lat 1942
- Rework the PrimaryLogPG::log_op_stats varpath list: drop the unused
inb/outb entries (both programs read them from PT_REGS_PARM3/4) and
add pg, object-name and MOSDOp::ops chains via cast:MOSDOp, filling
the 10-varid budget exactly.
- Populate the new fields in uprobe_log_op_stats_v2 only after the -l
threshold gate, keeping the in-kernel fast path unchanged (~670ns);
the enriched body costs ~3.0us/op vs ~2.4us before (measured via
bpftool prog stats on a vstart cluster).
- Reads of the new varids degrade silently to zeroed fields when
tracing with DWARF JSON exported before this change
(read_hprobe_varfield_opt), instead of dropping events or spamming
bpf_printk.
- Classify read/write by decoded opcode mode bits, which labels
zero-payload deletes and omap-only class methods correctly; fall
back to wb>0 when detail ops are unavailable.
- Teach resolve_type_name to strip typedef/cv wrappers and keep
scanning CUs for a complete definition: MOSDOp is now a using-alias
for the templated _mosdop::MOSDOp<std::vector<OSDOp>> living in a
namespace the type cache does not descend into, so the first cached
hit may be a typedef leading to a declaration-only DIE.
- Harden fill_map_hprobes against varid budget/field capacity
overflows in both osdtrace and radostrace.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single mode (
-s) previously emitted only exit-time latency histograms. This PR extends the singlePrimaryLogPG::log_op_statsprobe (uprobe_log_op_stats_v2) so each op prints a detailed line — target pg id, object name, decoded osd op list (incl. cls calls), client id, tid, total latency — while keeping the histograms:No new probes are attached: everything is read at
log_op_statstime from the message via newcast:MOSDOpvarpaths, reusing the existingcapture_decoded_osd_ops()machinery and rodata constants.Changes
inb/outbentries (read fromPT_REGS_PARM3/4by both program variants) and add pg (MOSDOp::pgid), object name (MOSDOp::hobj.oid.name) andMOSDOp::opsvector-bounds chains — filling the 10-varid budget exactly.-lthreshold gate, so the in-kernel fast path is unchanged (~670 ns). Newread_hprobe_varfield_optdegrades silently to zeroed fields when the varids are absent (DWARF JSON exported before this change) instead of dropping events or spammingbpf_printk.deleteand omap-only class methods are correctly labeledop_w— withwb>0as the fallback for degraded DWARF data.resolve_type_name(used bycast:) now strips typedef/cv wrappers and keeps scanning CUs for a complete definition. Needed becauseMOSDOpis nowusing MOSDOp = _mosdop::MOSDOp<std::vector<OSDOp>>— the class lives in a namespace the type cache does not descend into, so the first cached hit is a typedef that can lead to a declaration-only DIE.fill_map_hprobes(osdtrace + radostrace) errors out on >10 varpaths per function or >10 fields per varpath instead of silently corrupting adjacent varids / overflowingVarField_Kernel.fields.Overhead (vstart, tentacle dev build, kernel 6.17, via
bpftool progstats)-sper-op body-s -l <ms>fast pathTest plan
rados bench4K write + cleanup:op_wlines with[set-alloc-hint,write],[delete], correct pg/object/client/tid, op_lat consistent with bench-reported latencyop_r [read]linespg 0.0,object -), events still emitted🤖 Generated with Claude Code
https://claude.ai/code/session_01SQMVEJezhKCMbVMWFpNi5B