Lines Matching +full:out +full:- +full:functions
3 # Print the top N most executed functions in QEMU using callgrind.
5 # topN_callgrind.py [-h] [-n] <number of displayed top functions> -- \
9 # [-h] - Print the script arguments help message.
10 # [-n] - Specify the number of top functions to print.
11 # - If this flag is not specified, the tool defaults to 25.
14 # topN_callgrind.py -n 20 -- qemu-arm coulomb_double-arm
42 usage='topN_callgrind.py [-h] [-n] <number of displayed top functions> -- '
46 parser.add_argument('-n', dest='top', type=int, default=25,
47 help='Specify the number of top functions to print.')
65 ["valgrind", "--tool=callgrind", "--callgrind-out-file=/tmp/callgrind.data"]
70 sys.exit(callgrind.stderr.decode("utf-8"))
72 # Save callgrind_annotate output to /tmp/callgrind_annotate.out
73 with open("/tmp/callgrind_annotate.out", "w") as output:
81 os.unlink('/tmp/callgrind_annotate.out')
82 sys.exit(callgrind_annotate.stderr.decode("utf-8"))
86 with open('/tmp/callgrind_annotate.out', 'r') as data:
101 # Number of functions recorded by callgrind, last two lines are always empty
102 number_of_functions = len(callgrind_data) - first_func_line - 2
104 # Limit the number of top functions to "top"
108 # Store the data of the top functions in top_functions[]
117 '-' * 4,
118 '-' * 10,
119 '-' * 30,
120 '-' * 30,
123 # Print top N functions
140 os.unlink('/tmp/callgrind_annotate.out')