gdb: make 'osv leak show' work with python3
gdb: fix 'osv leak show'

Traceback (most recent call last):
  File "/home/tgrabiec/src/osv/scripts/loader.py", line 1165, in invoke
    show_leak()
  File "/home/tgrabiec/src/osv/scripts/loader.py", line 1104, in show_leak
    si = syminfo(f)
  File "/home/tgrabiec/src/osv/scripts/loader.py", line 117, in syminfo
    return symbol_formatter(syminfo_resolver(addr))
TypeError: object() takes no parameters
Error occurred in Python command: object() takes no parameters

Reported-by: Gleb Natapov <gleb@cloudius-systems.com>
trace: fix trace list-timed

Broken by commit 1e53a52f6664b0c53a3d867386565511efeae25a.
trace: unify timed trace extraction

The algorithm was duplicated between 'prof-wait','prof-lock' and 'list
timed','summary --timed'. This change unifies all paths.

As a side effect, mutex_lock_wait/mutex_lock_wake pair is now
recognized as timed sample and appears in 'summary --timed' and
'trace list-timed'

This refactoring will also make it easy to declare timed samples which
are correlated by data rather than calling thread.
trace: introduce 'prof-timed' command

This command shows a duration profile like 'prof-wait' or 'prof-lock'
but is more generic, it can work with any timed traces.

'trace prof-wait' is equivalent of 'trace prof-timed -t sched_wait'
'trace prof-lock' is equivalent of 'trace prof-timed -t mutex_lock_wait'
tests: increase coverage of trace.py
trace: make timed-trace recognition handle discontinuous streams properly

This change aims to reduce the likelihood of running into issue
stream may not be. If samples cross CPUs and the CPU of the second
sample has its earliest sample after the first sample, we ignore that
pair as the second sample has a high chance of belonging to other
pair.

This change does not solve the problem completly because there may be
a situation when sample which was recorded on another CPU was
discarded and the next sample will be again on the first CPU.
core: add handle_incoming_wakeups tracepoints