tools: in performance-log-viewer.py, fix "function()" predicate ...
... when not specifying a thread-ID
(cherry picked from commit 84227fbfec
)
This commit is contained in:
@ -727,11 +727,12 @@ class FindSamplesPopover (Gtk.Popover):
|
|||||||
for i in range (len (samples)):
|
for i in range (len (samples)):
|
||||||
try:
|
try:
|
||||||
def match_thread (thread, id, state = None):
|
def match_thread (thread, id, state = None):
|
||||||
return (type (id) == int and \
|
return (id is None or \
|
||||||
|
(type (id) == int and \
|
||||||
id == thread.id) or \
|
id == thread.id) or \
|
||||||
(type (id) == str and \
|
(type (id) == str and \
|
||||||
thread.name and \
|
thread.name and \
|
||||||
re.fullmatch (id, thread.name)) and \
|
re.fullmatch (id, thread.name))) and \
|
||||||
(state is None or \
|
(state is None or \
|
||||||
re.fullmatch (state, str (thread.state)))
|
re.fullmatch (state, str (thread.state)))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user