Skip to content

Commit a8151d9

Browse files
committed
Handle process names that are just numbers.
1 parent d483418 commit a8151d9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/TraceEvent/Stacks/Linux/LinuxPerfScriptEventParser.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,18 @@ private static int FindEndOfProcessCommand(FastStream source)
550550
}
551551
else if (!char.IsDigit((char)val))
552552
{
553-
if(source.Peek(idx+1) == '[')
553+
if (source.Peek(idx + 1) == '[')
554554
{
555555
return firstSpaceIdx;
556556
}
557-
goto startOver;
557+
else if (char.IsWhiteSpace((char)val))
558+
{
559+
firstSpaceIdx = (int)idx;
560+
}
561+
else
562+
{
563+
goto startOver;
564+
}
558565
}
559566
}
560567
}

0 commit comments

Comments
 (0)