]>
Commit | Line | Data |
---|---|---|
aadac5b3 | 1 | |
0e1309d0 MAL |
2 | specific_ss.add(files('control-target.c')) |
3 | ||
a81df1b6 PB |
4 | trace_events_files = [] |
5 | foreach dir : [ '.' ] + trace_events_subdirs | |
6 | trace_events_file = meson.source_root() / dir / 'trace-events' | |
7 | trace_events_files += [ trace_events_file ] | |
8 | group_name = dir == '.' ? 'root' : dir.underscorify() | |
9 | group = '--group=' + group_name | |
10 | fmt = '@0@-' + group_name + '.@1@' | |
11 | ||
12 | trace_h = custom_target(fmt.format('trace', 'h'), | |
13 | output: fmt.format('trace', 'h'), | |
14 | input: trace_events_file, | |
0572d6cd SH |
15 | command: [ tracetool, group, '--format=h', '@INPUT@', '@OUTPUT@' ], |
16 | depend_files: tracetool_depends) | |
a81df1b6 PB |
17 | genh += trace_h |
18 | trace_c = custom_target(fmt.format('trace', 'c'), | |
19 | output: fmt.format('trace', 'c'), | |
20 | input: trace_events_file, | |
0572d6cd SH |
21 | command: [ tracetool, group, '--format=c', '@INPUT@', '@OUTPUT@' ], |
22 | depend_files: tracetool_depends) | |
a81df1b6 PB |
23 | if 'CONFIG_TRACE_UST' in config_host |
24 | trace_ust_h = custom_target(fmt.format('trace-ust', 'h'), | |
25 | output: fmt.format('trace-ust', 'h'), | |
26 | input: trace_events_file, | |
0572d6cd SH |
27 | command: [ tracetool, group, '--format=ust-events-h', '@INPUT@', '@OUTPUT@' ], |
28 | depend_files: tracetool_depends) | |
a81df1b6 PB |
29 | trace_ss.add(trace_ust_h, lttng, urcubp) |
30 | genh += trace_ust_h | |
31 | endif | |
32 | trace_ss.add(trace_h, trace_c) | |
33 | if 'CONFIG_TRACE_DTRACE' in config_host | |
34 | trace_dtrace = custom_target(fmt.format('trace-dtrace', 'dtrace'), | |
35 | output: fmt.format('trace-dtrace', 'dtrace'), | |
36 | input: trace_events_file, | |
0572d6cd SH |
37 | command: [ tracetool, group, '--format=d', '@INPUT@', '@OUTPUT@' ], |
38 | depend_files: tracetool_depends) | |
a81df1b6 PB |
39 | trace_dtrace_h = custom_target(fmt.format('trace-dtrace', 'h'), |
40 | output: fmt.format('trace-dtrace', 'h'), | |
41 | input: trace_dtrace, | |
4b265c79 | 42 | command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ]) |
568ac779 RB |
43 | trace_ss.add(trace_dtrace_h) |
44 | if host_machine.system() != 'darwin' | |
45 | trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'), | |
46 | output: fmt.format('trace-dtrace', 'o'), | |
47 | input: trace_dtrace, | |
4b265c79 | 48 | command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ]) |
568ac779 RB |
49 | trace_ss.add(trace_dtrace_o) |
50 | endif | |
a81df1b6 | 51 | |
a81df1b6 PB |
52 | genh += trace_dtrace_h |
53 | endif | |
54 | endforeach | |
55 | ||
10e1d263 MAL |
56 | trace_events_all = custom_target('trace-events-all', |
57 | output: 'trace-events-all', | |
58 | input: trace_events_files, | |
59 | command: [ 'cat', '@INPUT@' ], | |
60 | capture: true, | |
61 | install: true, | |
ab4c0996 | 62 | install_dir: qemu_datadir) |
a81df1b6 | 63 | |
71c782f5 MAL |
64 | foreach d : [ |
65 | ['generated-tcg-tracers.h', 'tcg-h'], | |
66 | ['generated-helpers.c', 'tcg-helper-c'], | |
67 | ['generated-helpers.h', 'tcg-helper-h'], | |
68 | ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'], | |
69 | ] | |
0e1309d0 | 70 | gen = custom_target(d[0], |
71c782f5 MAL |
71 | output: d[0], |
72 | input: meson.source_root() / 'trace-events', | |
0572d6cd SH |
73 | command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@', '@OUTPUT@' ], |
74 | depend_files: tracetool_depends) | |
e921f1a7 | 75 | specific_ss.add(when: 'CONFIG_TCG', if_true: gen) |
71c782f5 MAL |
76 | endforeach |
77 | ||
a81df1b6 PB |
78 | if 'CONFIG_TRACE_UST' in config_host |
79 | trace_ust_all_h = custom_target('trace-ust-all.h', | |
80 | output: 'trace-ust-all.h', | |
81 | input: trace_events_files, | |
0572d6cd SH |
82 | command: [ tracetool, '--group=all', '--format=ust-events-h', '@INPUT@', '@OUTPUT@' ], |
83 | depend_files: tracetool_depends) | |
a81df1b6 PB |
84 | trace_ust_all_c = custom_target('trace-ust-all.c', |
85 | output: 'trace-ust-all.c', | |
86 | input: trace_events_files, | |
0572d6cd SH |
87 | command: [ tracetool, '--group=all', '--format=ust-events-c', '@INPUT@', '@OUTPUT@' ], |
88 | depend_files: tracetool_depends) | |
a81df1b6 PB |
89 | trace_ss.add(trace_ust_all_h, trace_ust_all_c) |
90 | genh += trace_ust_all_h | |
91 | endif | |
92 | ||
93 | trace_ss.add(when: 'CONFIG_TRACE_SIMPLE', if_true: files('simple.c')) | |
94 | trace_ss.add(when: 'CONFIG_TRACE_FTRACE', if_true: files('ftrace.c')) | |
95 | trace_ss.add(files('control.c')) | |
96 | trace_ss.add(files('qmp.c')) |