viz: exclude comma in register highlight (#14078)

* viz: exclude comma in register highlight

* simplify
This commit is contained in:
qazal
2026-01-09 01:10:30 -05:00
committed by GitHub
parent a071adffc0
commit 13e5d00d0e
2 changed files with 2 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ const drawGraph = (data) => {
}
return [ret];
}).join("text").style("font-family", g.graph().font).selectAll("tspan").data(d => d).join("tspan").attr("x", "0").attr("dy", g.graph().lh)
.selectAll("tspan").data(d => d).join("tspan").attr("dx", (d, i) => i > 0 ? textSpace: 0).text(d => d.st).attr("xml:space", "preserve")
.selectAll("tspan").data(d => d).join("tspan").attr("dx", (d, i) => i > 0 && d.st !== "," ? textSpace: 0).text(d => d.st).attr("xml:space", "preserve")
.classed("token", true).attr("fill", d => typeof d.color === "string" ? d.color : colorScale(d.color));
const tokensBg = rectGroup.selectAll("rect.bg").data((d, i, nodes) => {
const ret = [];

View File

@@ -434,7 +434,7 @@ def amdgpu_cfg(lib:bytes, target:int) -> dict:
elif nx in leaders: paths[curr][nx] = UNCOND
pc_tokens:dict[int, list[dict]] = {}
for pc, (text, _) in pc_table.items():
pc_tokens[pc] = [{"st":s, "keys":amdgpu_tokenize(s.replace(",", "")) if i>0 else [s], "kind":int(i>0)} for i,s in enumerate(text.split(" "))]
pc_tokens[pc] = [{"st":s, "keys":amdgpu_tokenize(s) if i>0 else [s], "kind":int(i>0)} for i,s in enumerate(text.replace(",", " , ").split(" "))]
return {"data":{"blocks":blocks, "paths":paths, "colors":cfg_colors, "pc_tokens":pc_tokens}, "src":"\n".join(lines)}
# ** Main render function to get the complete details about a trace event