Merge pull request #38864 from zhuzilin:timeline-dev-fix
PiperOrigin-RevId: 308634339 Change-Id: I2d7b7bba78e5693ec5f069e795cdb66eb0237c7d
This commit is contained in:
commit
6e4340799c
|
@ -400,9 +400,10 @@ class Timeline(object):
|
||||||
def _parse_kernel_label(self, label, node_name):
|
def _parse_kernel_label(self, label, node_name):
|
||||||
"""Parses the fields in a node timeline label."""
|
"""Parses the fields in a node timeline label."""
|
||||||
# Expects labels of the form: retval (arg) detail @@annotation
|
# Expects labels of the form: retval (arg) detail @@annotation
|
||||||
match = re.match(r'.*@@(.*)\#id.*', label)
|
start = label.find('@@')
|
||||||
if match is not None:
|
end = label.find('#')
|
||||||
node_name = match.group(1)
|
if start >= 0 and end >= 0 and start + 2 < end:
|
||||||
|
node_name = label[start + 2:end]
|
||||||
# Node names should always have the form 'name:op'.
|
# Node names should always have the form 'name:op'.
|
||||||
fields = node_name.split(':') + ['unknown']
|
fields = node_name.split(':') + ['unknown']
|
||||||
name, op = fields[:2]
|
name, op = fields[:2]
|
||||||
|
|
Loading…
Reference in New Issue