gobpf icon indicating copy to clipboard operation
gobpf copied to clipboard

Tracepipe flags updated

Open XieGuochao opened this issue 1 year ago • 0 comments

Root Cause

Since commit, a new flag migrate-disable delay has been added to the tracepipe flag.

Error

The current regex does not well to parse with the additional flag bit.

// A line from trace_pipe looks like (leading spaces included):
// `        chromium-15581 [000] d... 92783.722567: : Hello, World!`
var traceLineRegexp = regexp.MustCompile(`(.{16})-(\d+) +\[(\d{3})\] (.{4}) +(\d+\.\d+)\: (.*?)\: (.*)`)

Solution

Making the flag length variable can resolve this issue. I can create a PR for this. For example, (.{4}) should be (.{4,}).

XieGuochao avatar Jul 03 '23 20:07 XieGuochao