Skip to content

Commit 54fb5e1

Browse files
committed
Fix indentation of toplevel subprogram calls
Fix off-by-one bug in LogLineRaw component when computing indentation. Before this fix, the following fragment would not be indented: 586: (85) call pc+243 ... 830: frame1: R1_w=map_value(map=third_pa.bss,ks=4,vs=5044,off=128,smin=smin32=0,smax=umax=smax32=umax32=4416,var_off=(0x0; 0x1fc0)) R10=fp0 ; static int pick_most_loaded_cpu(struct cpdom_ctx *cpdomc) { @ balance.bpf.inc:180 830: (7b) *(u64 *)(r10 -32) = r1 ; frame1: R1_w=map_value(map=third_pa.bss,ks=4,vs=5044,off=128,smin=smin32=0,smax=umax=smax32=umax32=4416,var_off=(0x0; 0x1fc0)) R10=fp0 fp-32_w=map_value(map=third_pa.bss,ks=4,vs=5044,off=128,smin=smin32=0,smax=umax=smax32=umax32=4416,var_off=(0x0; 0x1fc0)) 831: (b4) w0 = -2 ; frame1: R0_w=0xfffffffe ; if (!per_cpu_dsq) @ balance.bpf.inc:185 832: (18) r1 = 0xffffc90001bdfc1a ; frame1: R1_w=map_value(map=third_pa.rodata,ks=4,vs=17826,off=3098) 834: (71) r1 = *(u8 *)(r1 +0) ; frame1: R1_w=0 835: (56) if w1 != 0x1 goto pc+78 ; frame1: R1_w=0 ; } @ balance.bpf.inc:206 914: (95) exit
1 parent b0d53be commit 54fb5e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ const LogLineRaw = ({
320320
const lineId = "line-" + idx;
321321
const indentSpans: ReactElement[] = [];
322322

323-
for (let i = 1; i < indentLevel; ++i) {
323+
for (let i = 0; i < indentLevel; ++i) {
324324
indentSpans.push(
325325
<span key={`indent-line${i}`} className="line-indent"></span>,
326326
);

0 commit comments

Comments
 (0)