^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # Cpu task migration overview toy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # perf script event handlers have been generated by perf script -g python
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # This software is distributed under the terms of the GNU General
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # Public License ("GPL") version 2 as published by the Free Software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # Foundation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) from __future__ import print_function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) import os
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) import sys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) from collections import defaultdict
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) try:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) from UserList import UserList
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) except ImportError:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # Python 3: UserList moved to the collections package
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) from collections import UserList
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) sys.path.append(os.environ['PERF_EXEC_PATH'] + \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) sys.path.append('scripts/python/Perf-Trace-Util/lib/Perf/Trace')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) from perf_trace_context import *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) from Core import *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) from SchedGui import *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) threads = { 0 : "idle"}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) def thread_name(pid):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) return "%s:%d" % (threads[pid], pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) class RunqueueEventUnknown:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) return None
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) return "unknown"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) class RunqueueEventSleep:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) return (0, 0, 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) def __init__(self, sleeper):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) self.sleeper = sleeper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) return "%s gone to sleep" % thread_name(self.sleeper)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) class RunqueueEventWakeup:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) return (0xff, 0xff, 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) def __init__(self, wakee):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) self.wakee = wakee
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) return "%s woke up" % thread_name(self.wakee)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) class RunqueueEventFork:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) return (0, 0xff, 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) def __init__(self, child):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) self.child = child
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) return "new forked task %s" % thread_name(self.child)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) class RunqueueMigrateIn:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) return (0, 0xf0, 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) def __init__(self, new):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) self.new = new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) return "task migrated in %s" % thread_name(self.new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) class RunqueueMigrateOut:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) @staticmethod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) def color():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) return (0xff, 0, 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) def __init__(self, old):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) self.old = old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) return "task migrated out %s" % thread_name(self.old)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) class RunqueueSnapshot:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) def __init__(self, tasks = [0], event = RunqueueEventUnknown()):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) self.tasks = tuple(tasks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) self.event = event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) def sched_switch(self, prev, prev_state, next):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) event = RunqueueEventUnknown()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) if taskState(prev_state) == "R" and next in self.tasks \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) and prev in self.tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) return self
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) if taskState(prev_state) != "R":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) event = RunqueueEventSleep(prev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) next_tasks = list(self.tasks[:])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) if prev in self.tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) if taskState(prev_state) != "R":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) next_tasks.remove(prev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) elif taskState(prev_state) == "R":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) next_tasks.append(prev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) if next not in next_tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) next_tasks.append(next)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) return RunqueueSnapshot(next_tasks, event)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) def migrate_out(self, old):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) if old not in self.tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) return self
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) next_tasks = [task for task in self.tasks if task != old]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) return RunqueueSnapshot(next_tasks, RunqueueMigrateOut(old))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) def __migrate_in(self, new, event):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) if new in self.tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) self.event = event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) return self
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) next_tasks = self.tasks[:] + tuple([new])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) return RunqueueSnapshot(next_tasks, event)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) def migrate_in(self, new):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) return self.__migrate_in(new, RunqueueMigrateIn(new))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) def wake_up(self, new):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) return self.__migrate_in(new, RunqueueEventWakeup(new))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) def wake_up_new(self, new):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) return self.__migrate_in(new, RunqueueEventFork(new))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) def load(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) """ Provide the number of tasks on the runqueue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) Don't count idle"""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) return len(self.tasks) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) def __repr__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) ret = self.tasks.__repr__()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) ret += self.origin_tostring()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) return ret
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) class TimeSlice:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) def __init__(self, start, prev):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) self.start = start
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) self.prev = prev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) self.end = start
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) # cpus that triggered the event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) self.event_cpus = []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) if prev is not None:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) self.total_load = prev.total_load
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) self.rqs = prev.rqs.copy()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) self.rqs = defaultdict(RunqueueSnapshot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) self.total_load = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) def __update_total_load(self, old_rq, new_rq):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) diff = new_rq.load() - old_rq.load()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) self.total_load += diff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) def sched_switch(self, ts_list, prev, prev_state, next, cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) old_rq = self.prev.rqs[cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) new_rq = old_rq.sched_switch(prev, prev_state, next)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) if old_rq is new_rq:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) self.rqs[cpu] = new_rq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) self.__update_total_load(old_rq, new_rq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) ts_list.append(self)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) self.event_cpus = [cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) def migrate(self, ts_list, new, old_cpu, new_cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) if old_cpu == new_cpu:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) old_rq = self.prev.rqs[old_cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) out_rq = old_rq.migrate_out(new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) self.rqs[old_cpu] = out_rq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) self.__update_total_load(old_rq, out_rq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) new_rq = self.prev.rqs[new_cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) in_rq = new_rq.migrate_in(new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) self.rqs[new_cpu] = in_rq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) self.__update_total_load(new_rq, in_rq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) ts_list.append(self)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) if old_rq is not out_rq:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) self.event_cpus.append(old_cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) self.event_cpus.append(new_cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) def wake_up(self, ts_list, pid, cpu, fork):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) old_rq = self.prev.rqs[cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) if fork:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) new_rq = old_rq.wake_up_new(pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) new_rq = old_rq.wake_up(pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) if new_rq is old_rq:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) self.rqs[cpu] = new_rq
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) self.__update_total_load(old_rq, new_rq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) ts_list.append(self)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) self.event_cpus = [cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) def next(self, t):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) self.end = t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) return TimeSlice(t, self)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) class TimeSliceList(UserList):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) def __init__(self, arg = []):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) self.data = arg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) def get_time_slice(self, ts):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) if len(self.data) == 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) slice = TimeSlice(ts, TimeSlice(-1, None))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) slice = self.data[-1].next(ts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) return slice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) def find_time_slice(self, ts):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) start = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) end = len(self.data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) found = -1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) searching = True
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) while searching:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) if start == end or start == end - 1:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) searching = False
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) i = (end + start) / 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) if self.data[i].start <= ts and self.data[i].end >= ts:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) found = i
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) end = i
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) continue
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) if self.data[i].end < ts:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) start = i
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) elif self.data[i].start > ts:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) end = i
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) return found
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) def set_root_win(self, win):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) self.root_win = win
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) def mouse_down(self, cpu, t):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) idx = self.find_time_slice(t)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) if idx == -1:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) ts = self[idx]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) rq = ts.rqs[cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) raw = "CPU: %d\n" % cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) raw += "Last event : %s\n" % rq.event.__repr__()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) raw += "Timestamp : %d.%06d\n" % (ts.start / (10 ** 9), (ts.start % (10 ** 9)) / 1000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) raw += "Duration : %6d us\n" % ((ts.end - ts.start) / (10 ** 6))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) raw += "Load = %d\n" % rq.load()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) for t in rq.tasks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) raw += "%s \n" % thread_name(t)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) self.root_win.update_summary(raw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) def update_rectangle_cpu(self, slice, cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) rq = slice.rqs[cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) if slice.total_load != 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) load_rate = rq.load() / float(slice.total_load)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) else:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) load_rate = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) red_power = int(0xff - (0xff * load_rate))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) color = (0xff, red_power, red_power)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) top_color = None
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) if cpu in slice.event_cpus:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) top_color = rq.event.color()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) self.root_win.paint_rectangle_zone(cpu, color, top_color, slice.start, slice.end)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) def fill_zone(self, start, end):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) i = self.find_time_slice(start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) if i == -1:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) for i in range(i, len(self.data)):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) timeslice = self.data[i]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) if timeslice.start > end:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) for cpu in timeslice.rqs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) self.update_rectangle_cpu(timeslice, cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) def interval(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) if len(self.data) == 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) return (0, 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) return (self.data[0].start, self.data[-1].end)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) def nr_rectangles(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) last_ts = self.data[-1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) max_cpu = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) for cpu in last_ts.rqs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) if cpu > max_cpu:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) max_cpu = cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) return max_cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) class SchedEventProxy:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) def __init__(self):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) self.current_tsk = defaultdict(lambda : -1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) self.timeslices = TimeSliceList()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) def sched_switch(self, headers, prev_comm, prev_pid, prev_prio, prev_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) next_comm, next_pid, next_prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) """ Ensure the task we sched out this cpu is really the one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) we logged. Otherwise we may have missed traces """
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) on_cpu_task = self.current_tsk[headers.cpu]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) if on_cpu_task != -1 and on_cpu_task != prev_pid:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) print("Sched switch event rejected ts: %s cpu: %d prev: %s(%d) next: %s(%d)" % \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) headers.ts_format(), headers.cpu, prev_comm, prev_pid, next_comm, next_pid)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) threads[prev_pid] = prev_comm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) threads[next_pid] = next_comm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) self.current_tsk[headers.cpu] = next_pid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) ts = self.timeslices.get_time_slice(headers.ts())
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) ts.sched_switch(self.timeslices, prev_pid, prev_state, next_pid, headers.cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) def migrate(self, headers, pid, prio, orig_cpu, dest_cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) ts = self.timeslices.get_time_slice(headers.ts())
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) ts.migrate(self.timeslices, pid, orig_cpu, dest_cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) def wake_up(self, headers, comm, pid, success, target_cpu, fork):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) if success == 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) ts = self.timeslices.get_time_slice(headers.ts())
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) ts.wake_up(self.timeslices, pid, target_cpu, fork)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) def trace_begin():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) global parser
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) parser = SchedEventProxy()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) def trace_end():
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) app = wx.App(False)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) timeslices = parser.timeslices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) frame = RootFrame(timeslices, "Migration")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) app.MainLoop()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) def sched__sched_stat_runtime(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) common_callchain, comm, pid, runtime, vruntime):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) def sched__sched_stat_iowait(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) common_callchain, comm, pid, delay):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) def sched__sched_stat_sleep(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) common_callchain, comm, pid, delay):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) def sched__sched_stat_wait(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) common_callchain, comm, pid, delay):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) def sched__sched_process_fork(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) common_callchain, parent_comm, parent_pid, child_comm, child_pid):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) def sched__sched_process_wait(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) common_callchain, comm, pid, prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) def sched__sched_process_exit(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) common_callchain, comm, pid, prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) def sched__sched_process_free(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) common_callchain, comm, pid, prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) def sched__sched_migrate_task(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) common_callchain, comm, pid, prio, orig_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) dest_cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) headers = EventHeaders(common_cpu, common_secs, common_nsecs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) common_pid, common_comm, common_callchain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) parser.migrate(headers, pid, prio, orig_cpu, dest_cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) def sched__sched_switch(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) common_secs, common_nsecs, common_pid, common_comm, common_callchain,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) prev_comm, prev_pid, prev_prio, prev_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) next_comm, next_pid, next_prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) headers = EventHeaders(common_cpu, common_secs, common_nsecs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) common_pid, common_comm, common_callchain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) parser.sched_switch(headers, prev_comm, prev_pid, prev_prio, prev_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) next_comm, next_pid, next_prio)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) def sched__sched_wakeup_new(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) common_callchain, comm, pid, prio, success,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) target_cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) headers = EventHeaders(common_cpu, common_secs, common_nsecs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) common_pid, common_comm, common_callchain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) parser.wake_up(headers, comm, pid, success, target_cpu, 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) def sched__sched_wakeup(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) common_callchain, comm, pid, prio, success,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) target_cpu):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) headers = EventHeaders(common_cpu, common_secs, common_nsecs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) common_pid, common_comm, common_callchain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) parser.wake_up(headers, comm, pid, success, target_cpu, 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) def sched__sched_wait_task(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) common_callchain, comm, pid, prio):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) def sched__sched_kthread_stop_ret(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) common_callchain, ret):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) def sched__sched_kthread_stop(event_name, context, common_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) common_secs, common_nsecs, common_pid, common_comm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) common_callchain, comm, pid):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) def trace_unhandled(event_name, context, event_fields_dict):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) pass