tor-jeremiassen | 69f2841 | 2016-02-17 10:58:21 -0600 | [diff] [blame^] | 1 | # |
| 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 | |
| 18 | import os |
| 19 | import sys |
| 20 | |
| 21 | sys.path.append(os.environ['PERF_EXEC_PATH'] + \ |
| 22 | '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') |
| 23 | |
| 24 | from perf_trace_context import * |
| 25 | |
| 26 | def trace_begin(): |
| 27 | pass; |
| 28 | |
| 29 | def trace_end(): |
| 30 | pass |
| 31 | |
| 32 | def process_event(t): |
| 33 | |
| 34 | sample = t['sample'] |
| 35 | |
| 36 | print "range:",format(sample['ip'],"x"),"-",format(sample['addr'],"x") |
| 37 | |
| 38 | def 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 | |
| 41 | def 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), |