1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
from timechart.plugin import *
from timechart import colors
from timechart.model import tcProcess
# to use with start_spi.sh
last_spi = []
class spi(plugin):
additional_colors = """
spi_bg #80ff80
"""
additional_ftrace_parsers = [
]
additional_process_types = {
"spi":(tcProcess, MISC_TRACES_CLASS),
}
@staticmethod
def do_function_spi_sync(proj,event):
global last_spi
process = proj.generic_find_process(0,"spi:%s"%(event.caller),"spi")
last_spi.append(process)
proj.generic_process_start(process,event,False)
@staticmethod
def do_function_spi_complete(proj,event):
global last_spi
if len(last_spi):
process = last_spi.pop(0)
proj.generic_process_end(process,event,False)
@staticmethod
def do_function_spi_async(proj,event):
if event.caller != 'spi_sync':
spi.do_function_spi_sync(proj,event)
plugin_register(spi)
|