tools: in performance-log-viewer.py, fix "function()" predicate ...

... when not specifying a thread-ID
This commit is contained in:
Ell 2018-11-10 02:51:07 -05:00
parent c7f1730702
commit 84227fbfec

View file

@ -727,12 +727,13 @@ class FindSamplesPopover (Gtk.Popover):
for i in range (len (samples)):
try:
def match_thread (thread, id, state = None):
return (type (id) == int and \
id == thread.id) or \
(type (id) == str and \
thread.name and \
re.fullmatch (id, thread.name)) and \
(state is None or \
return (id is None or \
(type (id) == int and \
id == thread.id) or \
(type (id) == str and \
thread.name and \
re.fullmatch (id, thread.name))) and \
(state is None or \
re.fullmatch (state, str (thread.state)))
def thread (id, state = None):