blob: c8edacba0f83852bf54427a9e5f4dca9871cc0ad [file] [log] [blame]
tor-jeremiassen69f28412016-02-17 10:58:21 -06001#
2# Copyright(C) 2016 Linaro Limited. All rights reserved.
3# Author: Tor Jeremiassen <tor.jeremiassen@linaro.org>
4#
5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 as published by
7# the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but WITHOUT
10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12# more details.
13#
14# You should have received a copy of the GNU General Public License along with
15# this program. If not, see <http://www.gnu.org/licenses/>.
16#
17
18import os
19import sys
20
21sys.path.append(os.environ['PERF_EXEC_PATH'] + \
22 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
23
24from perf_trace_context import *
25
26def trace_begin():
27 pass;
28
29def trace_end():
30 pass
31
32def process_event(t):
33
34 sample = t['sample']
35
36 print "range:",format(sample['ip'],"x"),"-",format(sample['addr'],"x")
37
38def trace_unhandled(event_name, context, event_fields_dict):
39 print ' '.join(['%s=%s'%(k,str(v))for k,v in sorted(event_fields_dict.items())])
40
41def print_header(event_name, cpu, secs, nsecs, pid, comm):
42 print "print_header"
43 print "%-20s %5u %05u.%09u %8u %-20s " % \
44 (event_name, cpu, secs, nsecs, pid, comm),