trace: Support disabled events in trace-events

Sometimes it is useful to disable a trace event.  Removing the event
from trace-events is not enough since source code will call the
trace_*() function for the event.

This patch makes it easy to build without specific trace events by
marking them disabled in trace-events:

disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d"

This builds without the multiwrite_cb trace event.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

trace: Allow bulk enabling/disabling of trace events at compile time

For 'simple' trace backend, allow bulk enabling/disabling of trace
events at compile time.  Trace events that are preceded by 'disable'
keyword are compiled in, but turned off by default. These can
individually be turned on using the monitor.  All other trace events are
enabled by default.

TODO :
This could be enhanced when the trace-event namespace is partitioned into a
group and an ID within that group. In such a case, marking a group as enabled
would automatically enable all trace-events listed under it.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2 files changed
tree: 3181cf9f43c5a8c7fda5a4765b589b58a20cbfdf
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. docs/
  7. fpu/
  8. fsdev/
  9. gdb-xml/
  10. hw/
  11. linux-user/
  12. net/
  13. pc-bios/
  14. QMP/
  15. roms/
  16. slirp/
  17. sysconfigs/
  18. target-alpha/
  19. target-arm/
  20. target-cris/
  21. target-i386/
  22. target-m68k/
  23. target-microblaze/
  24. target-mips/
  25. target-ppc/
  26. target-s390x/
  27. target-sh4/
  28. target-sparc/
  29. tcg/
  30. tests/
  31. ui/
  32. .gitignore
  33. .gitmodules
  34. a.out.h
  35. acl.c
  36. acl.h
  37. aes.c
  38. aes.h
  39. aio.c
  40. alpha-dis.c
  41. alpha.ld
  42. arch_init.c
  43. arch_init.h
  44. arm-dis.c
  45. arm-semi.c
  46. arm.ld
  47. async.c
  48. balloon.c
  49. balloon.h
  50. block-migration.c
  51. block-migration.h
  52. block.c
  53. block.h
  54. block_int.h
  55. blockdev.c
  56. blockdev.h
  57. bswap.h
  58. bt-host.c
  59. bt-host.h
  60. bt-vhci.c
  61. buffered_file.c
  62. buffered_file.h
  63. cache-utils.c
  64. cache-utils.h
  65. Changelog
  66. check-qdict.c
  67. check-qfloat.c
  68. check-qint.c
  69. check-qjson.c
  70. check-qlist.c
  71. check-qstring.c
  72. cmd.c
  73. cmd.h
  74. CODING_STYLE
  75. config.h
  76. configure
  77. console.c
  78. console.h
  79. COPYING
  80. COPYING.LIB
  81. cpu-all.h
  82. cpu-common.h
  83. cpu-defs.h
  84. cpu-exec.c
  85. cpus.c
  86. cpus.h
  87. create_config
  88. cris-dis.c
  89. cursor.c
  90. cursor_hidden.xpm
  91. cursor_left_ptr.xpm
  92. cutils.c
  93. def-helper.h
  94. device_tree.c
  95. device_tree.h
  96. dis-asm.h
  97. disas.c
  98. disas.h
  99. dma-helpers.c
  100. dma.h
  101. dyngen-exec.h
  102. elf.h
  103. envlist.c
  104. envlist.h
  105. exec-all.h
  106. exec.c
  107. feature_to_c.sh
  108. gdbstub.c
  109. gdbstub.h
  110. gen-icount.h
  111. host-utils.c
  112. host-utils.h
  113. hpet.h
  114. hppa-dis.c
  115. hppa.ld
  116. hxtool
  117. i386-dis.c
  118. i386.ld
  119. ia64-dis.c
  120. ia64.ld
  121. input.c
  122. ioport-user.c
  123. ioport.c
  124. ioport.h
  125. iov.c
  126. iov.h
  127. json-lexer.c
  128. json-lexer.h
  129. json-parser.c
  130. json-parser.h
  131. json-streamer.c
  132. json-streamer.h
  133. kvm-all.c
  134. kvm-stub.c
  135. kvm.h
  136. libfdt_env.h
  137. LICENSE
  138. linux-aio.c
  139. m68k-dis.c
  140. m68k-semi.c
  141. m68k.ld
  142. MAINTAINERS
  143. Makefile
  144. Makefile.dis
  145. Makefile.hw
  146. Makefile.objs
  147. Makefile.target
  148. Makefile.user
  149. microblaze-dis.c
  150. migration-exec.c
  151. migration-fd.c
  152. migration-tcp.c
  153. migration-unix.c
  154. migration.c
  155. migration.h
  156. mips-dis.c
  157. mips.ld
  158. module.c
  159. module.h
  160. monitor.c
  161. monitor.h
  162. nbd.c
  163. nbd.h
  164. net-checksum.c
  165. net.c
  166. net.h
  167. notify.c
  168. notify.h
  169. os-posix.c
  170. os-win32.c
  171. osdep.c
  172. osdep.h
  173. path.c
  174. pci-ids.txt
  175. poison.h
  176. posix-aio-compat.c
  177. ppc-dis.c
  178. ppc.ld
  179. ppc64.ld
  180. qbool.c
  181. qbool.h
  182. qdict-test-data.txt
  183. qdict.c
  184. qdict.h
  185. qemu-aio.h
  186. qemu-barrier.h
  187. qemu-binfmt-conf.sh
  188. qemu-char.c
  189. qemu-char.h
  190. qemu-common.h
  191. qemu-config.c
  192. qemu-config.h
  193. qemu-doc.texi
  194. qemu-error.c
  195. qemu-error.h
  196. qemu-img-cmds.hx
  197. qemu-img.c
  198. qemu-img.texi
  199. qemu-io.c
  200. qemu-lock.h
  201. qemu-log.h
  202. qemu-malloc.c
  203. qemu-monitor.hx
  204. qemu-nbd.c
  205. qemu-nbd.texi
  206. qemu-objects.h
  207. qemu-option.c
  208. qemu-option.h
  209. qemu-options.h
  210. qemu-options.hx
  211. qemu-os-posix.h
  212. qemu-os-win32.h
  213. qemu-queue.h
  214. qemu-sockets.c
  215. qemu-tech.texi
  216. qemu-thread.c
  217. qemu-thread.h
  218. qemu-timer.c
  219. qemu-timer.h
  220. qemu-tool.c
  221. qemu-x509.h
  222. qemu.sasl
  223. qemu_socket.h
  224. qerror.c
  225. qerror.h
  226. qfloat.c
  227. qfloat.h
  228. qint.c
  229. qint.h
  230. qjson.c
  231. qjson.h
  232. qlist.c
  233. qlist.h
  234. qobject.h
  235. qstring.c
  236. qstring.h
  237. readline.c
  238. readline.h
  239. README
  240. rules.mak
  241. rwhandler.c
  242. rwhandler.h
  243. s390-dis.c
  244. s390.ld
  245. savevm.c
  246. sh4-dis.c
  247. simpletrace.c
  248. simpletrace.h
  249. simpletrace.py
  250. softmmu-semi.h
  251. softmmu_defs.h
  252. softmmu_exec.h
  253. softmmu_header.h
  254. softmmu_template.h
  255. sparc-dis.c
  256. sparc.ld
  257. sparc64.ld
  258. sysemu.h
  259. targphys.h
  260. tcg-runtime.c
  261. texi2pod.pl
  262. thunk.c
  263. thunk.h
  264. TODO
  265. trace-events
  266. tracetool
  267. translate-all.c
  268. uboot_image.h
  269. usb-bsd.c
  270. usb-linux.c
  271. usb-stub.c
  272. VERSION
  273. vgafont.h
  274. vl.c
  275. x86_64.ld