@triniwiz/nativescript-masonkit 1.0.0-alpha.12 → 1.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/common.js.map +1 -1
  2. package/helpers.d.ts +5 -5
  3. package/helpers.js +0 -3
  4. package/helpers.js.map +1 -1
  5. package/index.android.js +2 -2
  6. package/index.android.js.map +1 -1
  7. package/index.ios.js +2 -2
  8. package/index.ios.js.map +1 -1
  9. package/package.json +2 -2
  10. package/platforms/android/masonkit-release.aar +0 -0
  11. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  12. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +4559 -1456
  13. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  14. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +1932 -1932
  15. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  16. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +4559 -1456
  17. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +4559 -1456
  18. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  19. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +1932 -1932
  20. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +1883 -1883
  21. package/style.d.ts +1 -1
  22. package/style.js +0 -1
  23. package/style.js.map +1 -1
  24. package/node.d.ts +0 -2
  25. package/node.js +0 -3
  26. package/node.js.map +0 -1
  27. package/platforms/ios/Podfile +0 -1
  28. package/platforms/ios/build.xcconfig +0 -5
  29. package/platforms/ios/prebuild.sh +0 -101
  30. package/platforms/new_native_src/cpp/Caches.cpp +0 -36
  31. package/platforms/new_native_src/cpp/Caches.h +0 -42
  32. package/platforms/new_native_src/cpp/Common.h +0 -34
  33. package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
  34. package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
  35. package/platforms/new_native_src/cpp/Helpers.h +0 -364
  36. package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
  37. package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
  38. package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
  39. package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
  40. package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
  41. package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
  42. package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
  43. package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
  44. package/src-native/pods/Headers/include/APIDesign.md +0 -72
  45. package/src-native/pods/Headers/include/DEPS +0 -10
  46. package/src-native/pods/Headers/include/DIR_METADATA +0 -11
  47. package/src-native/pods/Headers/include/OWNERS +0 -23
  48. package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
  49. package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
  50. package/src-native/pods/Headers/include/cppgc/README.md +0 -133
  51. package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
  52. package/src-native/pods/Headers/include/cppgc/common.h +0 -29
  53. package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
  54. package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
  55. package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
  56. package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
  57. package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
  58. package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
  59. package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
  60. package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
  61. package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
  62. package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
  63. package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
  64. package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
  65. package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
  66. package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
  67. package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
  68. package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
  69. package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
  70. package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
  71. package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
  72. package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
  73. package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
  74. package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
  75. package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
  76. package/src-native/pods/Headers/include/cppgc/member.h +0 -291
  77. package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
  78. package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
  79. package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
  80. package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
  81. package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
  82. package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
  83. package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
  84. package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
  85. package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
  86. package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
  87. package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
  88. package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
  89. package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
  90. package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
  91. package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
  92. package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
  93. package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
  94. package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
  95. package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
  96. package/src-native/pods/Headers/include/libffi.h +0 -12
  97. package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
  98. package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
  99. package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
  100. package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
  101. package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
  102. package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
  103. package/src-native/pods/Headers/include/v8-container.h +0 -129
  104. package/src-native/pods/Headers/include/v8-context.h +0 -407
  105. package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
  106. package/src-native/pods/Headers/include/v8-data.h +0 -80
  107. package/src-native/pods/Headers/include/v8-date.h +0 -43
  108. package/src-native/pods/Headers/include/v8-debug.h +0 -168
  109. package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
  110. package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
  111. package/src-native/pods/Headers/include/v8-exception.h +0 -217
  112. package/src-native/pods/Headers/include/v8-extension.h +0 -62
  113. package/src-native/pods/Headers/include/v8-external.h +0 -37
  114. package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
  115. package/src-native/pods/Headers/include/v8-forward.h +0 -81
  116. package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
  117. package/src-native/pods/Headers/include/v8-function.h +0 -125
  118. package/src-native/pods/Headers/include/v8-initialization.h +0 -315
  119. package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
  120. package/src-native/pods/Headers/include/v8-inspector.h +0 -376
  121. package/src-native/pods/Headers/include/v8-internal.h +0 -661
  122. package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
  123. package/src-native/pods/Headers/include/v8-json.h +0 -47
  124. package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
  125. package/src-native/pods/Headers/include/v8-locker.h +0 -149
  126. package/src-native/pods/Headers/include/v8-maybe.h +0 -137
  127. package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
  128. package/src-native/pods/Headers/include/v8-message.h +0 -216
  129. package/src-native/pods/Headers/include/v8-metrics.h +0 -255
  130. package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
  131. package/src-native/pods/Headers/include/v8-microtask.h +0 -28
  132. package/src-native/pods/Headers/include/v8-object.h +0 -775
  133. package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
  134. package/src-native/pods/Headers/include/v8-platform.h +0 -1092
  135. package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
  136. package/src-native/pods/Headers/include/v8-primitive.h +0 -866
  137. package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
  138. package/src-native/pods/Headers/include/v8-promise.h +0 -174
  139. package/src-native/pods/Headers/include/v8-proxy.h +0 -50
  140. package/src-native/pods/Headers/include/v8-regexp.h +0 -105
  141. package/src-native/pods/Headers/include/v8-script.h +0 -748
  142. package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
  143. package/src-native/pods/Headers/include/v8-statistics.h +0 -217
  144. package/src-native/pods/Headers/include/v8-template.h +0 -1079
  145. package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
  146. package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
  147. package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
  148. package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
  149. package/src-native/pods/Headers/include/v8-util.h +0 -658
  150. package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
  151. package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
  152. package/src-native/pods/Headers/include/v8-value.h +0 -526
  153. package/src-native/pods/Headers/include/v8-version-string.h +0 -38
  154. package/src-native/pods/Headers/include/v8-version.h +0 -20
  155. package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
  156. package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
  157. package/src-native/pods/Headers/include/v8-wasm.h +0 -257
  158. package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
  159. package/src-native/pods/Headers/include/v8.h +0 -88
  160. package/src-native/pods/Headers/include/v8config.h +0 -605
  161. package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
  162. package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
  163. package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
  164. package/src-native/pods/Headers/inspector/base64.h +0 -9
  165. package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
  166. package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
  167. package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
  168. package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
  169. package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
  170. package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
  171. package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
  172. package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
  173. package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
  174. package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
  175. package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
  176. package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
  177. package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
  178. package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
  179. package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
  180. package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
  181. package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
  182. package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
  183. package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
  184. package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
  185. package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
  186. package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
  187. package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
  188. package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
  189. package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
  190. package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
  191. package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
  192. package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
  193. package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
  194. package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
  195. package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
  196. package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
  197. package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
  198. package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
  199. package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
  200. package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
  201. package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
  202. package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
  203. package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
  204. package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
  205. package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
  206. package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
  207. package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
  208. package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
  209. package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
  210. package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
  211. package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
  212. package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
  213. package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
  214. package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
  215. package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
  216. package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
  217. package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
  218. package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
  219. package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
  220. package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
  221. package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
  222. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
  223. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
  224. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
  225. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
  226. package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
  227. package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
  228. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
  229. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
  230. package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
  231. package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
  232. package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
  233. package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
  234. package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
  235. package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
  236. package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
  237. package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
  238. package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
  239. package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
  240. package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
  241. package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
  242. package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
  243. package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
  244. package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
  245. package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
  246. package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
  247. package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
  248. package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
  249. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
  250. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
  251. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
  252. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
  253. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
  254. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
  255. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
  256. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
  257. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
  258. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
  259. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
  260. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
  261. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
  262. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
  263. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
  264. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
  265. package/src-native/pods/Headers/inspector/utils.h +0 -32
  266. package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
  267. package/src-native/pods/Headers/jsi/decorator.h +0 -762
  268. package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
  269. package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
  270. package/src-native/pods/Headers/jsi/jsi.h +0 -1387
  271. package/src-native/pods/Headers/jsi/jsilib.h +0 -59
  272. package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
  273. package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
  274. package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
  275. package/src-native/pods/Headers/runtime/Caches.h +0 -98
  276. package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
  277. package/src-native/pods/Headers/runtime/Common.h +0 -9
  278. package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
  279. package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
  280. package/src-native/pods/Headers/runtime/Console.h +0 -27
  281. package/src-native/pods/Headers/runtime/Constants.h +0 -15
  282. package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
  283. package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
  284. package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
  285. package/src-native/pods/Headers/runtime/FFICall.h +0 -105
  286. package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
  287. package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
  288. package/src-native/pods/Headers/runtime/Helpers.h +0 -84
  289. package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
  290. package/src-native/pods/Headers/runtime/Interop.h +0 -202
  291. package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
  292. package/src-native/pods/Headers/runtime/Metadata.h +0 -981
  293. package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
  294. package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
  295. package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
  296. package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
  297. package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
  298. package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
  299. package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
  300. package/src-native/pods/Headers/runtime/Pointer.h +0 -26
  301. package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
  302. package/src-native/pods/Headers/runtime/Reference.h +0 -38
  303. package/src-native/pods/Headers/runtime/Runtime.h +0 -67
  304. package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
  305. package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
  306. package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
  307. package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
  308. package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
  309. package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
  310. package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
  311. package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
  312. package/src-native/pods/Headers/runtime/Tasks.h +0 -19
  313. package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
  314. package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
  315. package/src-native/pods/Headers/runtime/Worker.h +0 -26
  316. package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
  317. package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
  318. package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
  319. package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  320. package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
  321. package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  322. package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  323. package/src-native/pods/NativeScript.podspec +0 -68
@@ -1,1123 +0,0 @@
1
- // Copyright 2015 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- #ifndef BASE_TRACE_EVENT_COMMON_TRACE_EVENT_COMMON_H_
6
- #define BASE_TRACE_EVENT_COMMON_TRACE_EVENT_COMMON_H_
7
-
8
- // Trace events are for tracking application performance and resource usage.
9
- // Macros are provided to track:
10
- // Begin and end of function calls
11
- // Counters
12
- //
13
- // Events are issued against categories. Whereas LOG's
14
- // categories are statically defined, TRACE categories are created
15
- // implicitly with a string. For example:
16
- // TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent",
17
- // TRACE_EVENT_SCOPE_THREAD)
18
- //
19
- // It is often the case that one trace may belong in multiple categories at the
20
- // same time. The first argument to the trace can be a comma-separated list of
21
- // categories, forming a category group, like:
22
- //
23
- // TRACE_EVENT_INSTANT0("input,views", "OnMouseOver", TRACE_EVENT_SCOPE_THREAD)
24
- //
25
- // We can enable/disable tracing of OnMouseOver by enabling/disabling either
26
- // category.
27
- //
28
- // Events can be INSTANT, or can be pairs of BEGIN and END in the same scope:
29
- // TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly")
30
- // doSomethingCostly()
31
- // TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly")
32
- // Note: our tools can't always determine the correct BEGIN/END pairs unless
33
- // these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you
34
- // need them to be in separate scopes.
35
- //
36
- // A common use case is to trace entire function scopes. This
37
- // issues a trace BEGIN and END automatically:
38
- // void doSomethingCostly() {
39
- // TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly");
40
- // ...
41
- // }
42
- //
43
- // Additional parameters can be associated with an event:
44
- // void doSomethingCostly2(int howMuch) {
45
- // TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly",
46
- // "howMuch", howMuch);
47
- // ...
48
- // }
49
- //
50
- // The trace system will automatically add to this information the
51
- // current process id, thread id, and a timestamp in microseconds.
52
- //
53
- // To trace an asynchronous procedure such as an IPC send/receive, use
54
- // NESTABLE_ASYNC_BEGIN and NESTABLE_ASYNC_END:
55
- // [single threaded sender code]
56
- // static int send_count = 0;
57
- // ++send_count;
58
- // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
59
- // "ipc", "message", TRACE_ID_LOCAL(send_count));
60
- // Send(new MyMessage(send_count));
61
- // [receive code]
62
- // void OnMyMessage(send_count) {
63
- // TRACE_NESTABLE_EVENT_ASYNC_END0(
64
- // "ipc", "message", TRACE_ID_LOCAL(send_count));
65
- // }
66
- // The third parameter is a unique ID to match NESTABLE_ASYNC_BEGIN/ASYNC_END
67
- // pairs. NESTABLE_ASYNC_BEGIN and ASYNC_END can occur on any thread of any
68
- // traced process. // Pointers can be used for the ID parameter, and they will
69
- // be annotated internally so that the same pointer on two different processes
70
- // will not match. For example:
71
- // class MyTracedClass {
72
- // public:
73
- // MyTracedClass() {
74
- // TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("category", "MyTracedClass", this);
75
- // }
76
- // ~MyTracedClass() {
77
- // TRACE_EVENT_NESTABLE_ASYNC_END0("category", "MyTracedClass", this);
78
- // }
79
- // }
80
- //
81
- // Trace event also supports counters, which is a way to track a quantity
82
- // as it varies over time. Counters are created with the following macro:
83
- // TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue);
84
- //
85
- // Counters are process-specific. The macro itself can be issued from any
86
- // thread, however.
87
- //
88
- // Sometimes, you want to track two counters at once. You can do this with two
89
- // counter macros:
90
- // TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]);
91
- // TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]);
92
- // Or you can do it with a combined macro:
93
- // TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter",
94
- // "bytesPinned", g_myCounterValue[0],
95
- // "bytesAllocated", g_myCounterValue[1]);
96
- // This indicates to the tracing UI that these counters should be displayed
97
- // in a single graph, as a summed area chart.
98
- //
99
- // Since counters are in a global namespace, you may want to disambiguate with a
100
- // unique ID, by using the TRACE_COUNTER_ID* variations.
101
- //
102
- // By default, trace collection is compiled in, but turned off at runtime.
103
- // Collecting trace data is the responsibility of the embedding
104
- // application. In Chrome's case, navigating to about:tracing will turn on
105
- // tracing and display data collected across all active processes.
106
- //
107
- //
108
- // Memory scoping note:
109
- // Tracing copies the pointers, not the string content, of the strings passed
110
- // in for category_group, name, and arg_names. Thus, the following code will
111
- // cause problems:
112
- // char* str = strdup("importantName");
113
- // TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD!
114
- // free(str); // Trace system now has dangling pointer
115
- //
116
- // To avoid this issue with the |name| and |arg_name| parameters, use the
117
- // TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime overhead.
118
- // Notes: The category must always be in a long-lived char* (i.e. static const).
119
- // The |arg_values|, when used, are always deep copied with the _COPY
120
- // macros.
121
- //
122
- // When are string argument values copied:
123
- // const char* arg_values are only referenced by default:
124
- // TRACE_EVENT1("category", "name",
125
- // "arg1", "literal string is only referenced");
126
- // Use TRACE_STR_COPY to force copying of a const char*:
127
- // TRACE_EVENT1("category", "name",
128
- // "arg1", TRACE_STR_COPY("string will be copied"));
129
- // std::string arg_values are always copied:
130
- // TRACE_EVENT1("category", "name",
131
- // "arg1", std::string("string will be copied"));
132
- //
133
- //
134
- // Convertable notes:
135
- // Converting a large data type to a string can be costly. To help with this,
136
- // the trace framework provides an interface ConvertableToTraceFormat. If you
137
- // inherit from it and implement the AppendAsTraceFormat method the trace
138
- // framework will call back to your object to convert a trace output time. This
139
- // means, if the category for the event is disabled, the conversion will not
140
- // happen.
141
- //
142
- // class MyData : public base::trace_event::ConvertableToTraceFormat {
143
- // public:
144
- // MyData() {}
145
- // void AppendAsTraceFormat(std::string* out) const override {
146
- // out->append("{\"foo\":1}");
147
- // }
148
- // private:
149
- // ~MyData() override {}
150
- // DISALLOW_COPY_AND_ASSIGN(MyData);
151
- // };
152
- //
153
- // TRACE_EVENT1("foo", "bar", "data",
154
- // std::unique_ptr<ConvertableToTraceFormat>(new MyData()));
155
- //
156
- // The trace framework will take ownership if the passed pointer and it will
157
- // be free'd when the trace buffer is flushed.
158
- //
159
- // Note, we only do the conversion when the buffer is flushed, so the provided
160
- // data object should not be modified after it's passed to the trace framework.
161
- //
162
- //
163
- // Thread Safety:
164
- // A thread safe singleton and mutex are used for thread safety. Category
165
- // enabled flags are used to limit the performance impact when the system
166
- // is not enabled.
167
- //
168
- // TRACE_EVENT macros first cache a pointer to a category. The categories are
169
- // statically allocated and safe at all times, even after exit. Fetching a
170
- // category is protected by the TraceLog::lock_. Multiple threads initializing
171
- // the static variable is safe, as they will be serialized by the lock and
172
- // multiple calls will return the same pointer to the category.
173
- //
174
- // Then the category_group_enabled flag is checked. This is a unsigned char, and
175
- // not intended to be multithread safe. It optimizes access to AddTraceEvent
176
- // which is threadsafe internally via TraceLog::lock_. The enabled flag may
177
- // cause some threads to incorrectly call or skip calling AddTraceEvent near
178
- // the time of the system being enabled or disabled. This is acceptable as
179
- // we tolerate some data loss while the system is being enabled/disabled and
180
- // because AddTraceEvent is threadsafe internally and checks the enabled state
181
- // again under lock.
182
- //
183
- // Without the use of these static category pointers and enabled flags all
184
- // trace points would carry a significant performance cost of acquiring a lock
185
- // and resolving the category.
186
-
187
- // There are currently two implementations of the tracing macros. Firstly,
188
- // Perfetto (https://perfetto.dev/) implements a compatible set of macros which
189
- // we are migrating to. The Perfetto implementation is enabled through the
190
- // use_perfetto_client_library GN arg. If that flag is disabled, we fall back to
191
- // the legacy implementation in the latter half of this file (and
192
- // trace_event.h).
193
- // TODO(skyostil): Remove the legacy macro implementation.
194
-
195
- // Normally we'd use BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) for this, but
196
- // because v8 includes trace_event_common.h directly (in non-Perfetto mode), we
197
- // can't depend on any other header files here.
198
- #if defined(BASE_USE_PERFETTO_CLIENT_LIBRARY)
199
- ////////////////////////////////////////////////////////////////////////////////
200
- // Perfetto trace macros
201
-
202
- #include "base/threading/platform_thread.h"
203
- #include "base/time/time.h"
204
-
205
- // Export Perfetto symbols in the same way as //base symbols.
206
- #define PERFETTO_COMPONENT_EXPORT BASE_EXPORT
207
-
208
- // Enable legacy trace event macros (e.g., TRACE_EVENT{0,1,2}).
209
- #define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS 1
210
-
211
- // Macros for reading the current trace time (bypassing any virtual time
212
- // overrides).
213
- #define TRACE_TIME_TICKS_NOW() ::base::subtle::TimeTicksNowIgnoringOverride()
214
- #define TRACE_TIME_NOW() ::base::subtle::TimeNowIgnoringOverride()
215
-
216
- // Implementation detail: trace event macros create temporary variables
217
- // to keep instrumentation overhead low. These macros give each temporary
218
- // variable a unique name based on the line number to prevent name collisions.
219
- #define INTERNAL_TRACE_EVENT_UID(name_prefix) PERFETTO_UID(name_prefix)
220
-
221
- // Special trace event macro to trace task execution with the location where it
222
- // was posted from.
223
- // TODO(skyostil): Convert this into a regular typed trace event.
224
- #define TRACE_TASK_EXECUTION(run_function, task) \
225
- INTERNAL_TRACE_TASK_EXECUTION(run_function, task)
226
-
227
- // Special trace event macro to trace log messages.
228
- // TODO(skyostil): Convert this into a regular typed trace event.
229
- #define TRACE_LOG_MESSAGE(file, message, line) \
230
- INTERNAL_TRACE_LOG_MESSAGE(file, message, line)
231
-
232
- // Declare debug annotation converters for base time types, so they can be
233
- // passed as trace event arguments.
234
- // TODO(skyostil): Serialize timestamps using perfetto::TracedValue instead.
235
- namespace perfetto {
236
- namespace protos {
237
- namespace pbzero {
238
- class DebugAnnotation;
239
- } // namespace pbzero
240
- } // namespace protos
241
- namespace internal {
242
-
243
- void BASE_EXPORT
244
- WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation,
245
- ::base::TimeTicks);
246
- void BASE_EXPORT
247
- WriteDebugAnnotation(protos::pbzero::DebugAnnotation* annotation, ::base::Time);
248
-
249
- } // namespace internal
250
- } // namespace perfetto
251
-
252
- // Pull in the tracing macro definitions from Perfetto.
253
- #include "third_party/perfetto/include/perfetto/tracing.h"
254
-
255
- namespace perfetto {
256
- namespace legacy {
257
-
258
- template <>
259
- perfetto::ThreadTrack BASE_EXPORT
260
- ConvertThreadId(const ::base::PlatformThreadId& thread);
261
-
262
- } // namespace legacy
263
-
264
- template <>
265
- struct BASE_EXPORT TraceTimestampTraits<::base::TimeTicks> {
266
- static TraceTimestamp ConvertTimestampToTraceTimeNs(
267
- const ::base::TimeTicks& ticks);
268
- };
269
-
270
- } // namespace perfetto
271
-
272
- #else // !defined(BASE_USE_PERFETTO_CLIENT_LIBRARY)
273
- ////////////////////////////////////////////////////////////////////////////////
274
- // Legacy trace macros
275
-
276
- // What follows is the legacy TRACE_EVENT macro implementation, which is being
277
- // replaced by the Perfetto-based implementation above. New projects wishing to
278
- // enable tracing should use the Perfetto SDK. See
279
- // https://perfetto.dev/docs/instrumentation/tracing-sdk.
280
-
281
- // Check that nobody includes this file directly. Clients are supposed to
282
- // include the surrounding "trace_event.h" of their project instead.
283
- #if defined(TRACE_EVENT0)
284
- #error "Another copy of this file has already been included."
285
- #endif
286
-
287
- // This will mark the trace event as disabled by default. The user will need
288
- // to explicitly enable the event.
289
- #define TRACE_DISABLED_BY_DEFAULT(name) "disabled-by-default-" name
290
-
291
- // Records a pair of begin and end events called "name" for the current
292
- // scope, with 0, 1 or 2 associated arguments. If the category is not
293
- // enabled, then this does nothing.
294
- // - category and name strings must have application lifetime (statics or
295
- // literals). They may not include " chars.
296
- #define TRACE_EVENT0(category_group, name) \
297
- INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name)
298
- #define TRACE_EVENT_WITH_FLOW0(category_group, name, bind_id, flow_flags) \
299
- INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
300
- flow_flags)
301
- #define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
302
- INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val)
303
- #define TRACE_EVENT_WITH_FLOW1(category_group, name, bind_id, flow_flags, \
304
- arg1_name, arg1_val) \
305
- INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
306
- flow_flags, arg1_name, arg1_val)
307
- #define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \
308
- arg2_val) \
309
- INTERNAL_TRACE_EVENT_ADD_SCOPED(category_group, name, arg1_name, arg1_val, \
310
- arg2_name, arg2_val)
311
- #define TRACE_EVENT_WITH_FLOW2(category_group, name, bind_id, flow_flags, \
312
- arg1_name, arg1_val, arg2_name, arg2_val) \
313
- INTERNAL_TRACE_EVENT_ADD_SCOPED_WITH_FLOW(category_group, name, bind_id, \
314
- flow_flags, arg1_name, arg1_val, \
315
- arg2_name, arg2_val)
316
-
317
- // Records a single event called "name" immediately, with 0, 1 or 2
318
- // associated arguments. If the category is not enabled, then this
319
- // does nothing.
320
- // - category and name strings must have application lifetime (statics or
321
- // literals). They may not include " chars.
322
- #define TRACE_EVENT_INSTANT0(category_group, name, scope) \
323
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
324
- TRACE_EVENT_FLAG_NONE | scope)
325
- #define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val) \
326
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
327
- TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val)
328
- #define TRACE_EVENT_INSTANT2(category_group, name, scope, arg1_name, arg1_val, \
329
- arg2_name, arg2_val) \
330
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
331
- TRACE_EVENT_FLAG_NONE | scope, arg1_name, arg1_val, \
332
- arg2_name, arg2_val)
333
- #define TRACE_EVENT_COPY_INSTANT0(category_group, name, scope) \
334
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
335
- TRACE_EVENT_FLAG_COPY | scope)
336
- #define TRACE_EVENT_COPY_INSTANT1(category_group, name, scope, arg1_name, \
337
- arg1_val) \
338
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
339
- TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val)
340
- #define TRACE_EVENT_COPY_INSTANT2(category_group, name, scope, arg1_name, \
341
- arg1_val, arg2_name, arg2_val) \
342
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
343
- TRACE_EVENT_FLAG_COPY | scope, arg1_name, arg1_val, \
344
- arg2_name, arg2_val)
345
- #define TRACE_EVENT_INSTANT_WITH_FLAGS0(category_group, name, scope_and_flags) \
346
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
347
- scope_and_flags)
348
- #define TRACE_EVENT_INSTANT_WITH_FLAGS1(category_group, name, scope_and_flags, \
349
- arg1_name, arg1_val) \
350
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, category_group, name, \
351
- scope_and_flags, arg1_name, arg1_val)
352
-
353
- #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(category_group, name, scope, \
354
- timestamp) \
355
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
356
- TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \
357
- TRACE_EVENT_FLAG_NONE | scope)
358
-
359
- #define TRACE_EVENT_INSTANT_WITH_TIMESTAMP1(category_group, name, scope, \
360
- timestamp, arg_name, arg_val) \
361
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
362
- TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \
363
- TRACE_EVENT_FLAG_NONE | scope, arg_name, arg_val)
364
-
365
- // Records a single BEGIN event called "name" immediately, with 0, 1 or 2
366
- // associated arguments. If the category is not enabled, then this
367
- // does nothing.
368
- // - category and name strings must have application lifetime (statics or
369
- // literals). They may not include " chars.
370
- #define TRACE_EVENT_BEGIN0(category_group, name) \
371
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
372
- TRACE_EVENT_FLAG_NONE)
373
- #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \
374
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
375
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
376
- #define TRACE_EVENT_BEGIN2(category_group, name, arg1_name, arg1_val, \
377
- arg2_name, arg2_val) \
378
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
379
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
380
- arg2_name, arg2_val)
381
- #define TRACE_EVENT_BEGIN_WITH_FLAGS0(category_group, name, flags) \
382
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, flags)
383
- #define TRACE_EVENT_BEGIN_WITH_FLAGS1(category_group, name, flags, arg1_name, \
384
- arg1_val) \
385
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
386
- flags, arg1_name, arg1_val)
387
- #define TRACE_EVENT_COPY_BEGIN2(category_group, name, arg1_name, arg1_val, \
388
- arg2_name, arg2_val) \
389
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
390
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
391
- arg2_name, arg2_val)
392
-
393
- // Similar to TRACE_EVENT_BEGINx but with a custom |at| timestamp provided.
394
- // - |id| is used to match the _BEGIN event with the _END event.
395
- // Events are considered to match if their category_group, name and id values
396
- // all match. |id| must either be a pointer or an integer value up to 64 bits.
397
- // If it's a pointer, the bits will be xored with a hash of the process ID so
398
- // that the same pointer on two different processes will not collide.
399
- #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \
400
- thread_id, timestamp) \
401
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
402
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \
403
- timestamp, TRACE_EVENT_FLAG_NONE)
404
- #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \
405
- category_group, name, id, thread_id, timestamp) \
406
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
407
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \
408
- timestamp, TRACE_EVENT_FLAG_COPY)
409
- #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( \
410
- category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \
411
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
412
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \
413
- timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
414
- #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2( \
415
- category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \
416
- arg2_name, arg2_val) \
417
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
418
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \
419
- timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \
420
- arg2_val)
421
-
422
- // Records a single END event for "name" immediately. If the category
423
- // is not enabled, then this does nothing.
424
- // - category and name strings must have application lifetime (statics or
425
- // literals). They may not include " chars.
426
- #define TRACE_EVENT_END0(category_group, name) \
427
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
428
- TRACE_EVENT_FLAG_NONE)
429
- #define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val) \
430
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
431
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
432
- #define TRACE_EVENT_END2(category_group, name, arg1_name, arg1_val, arg2_name, \
433
- arg2_val) \
434
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
435
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
436
- arg2_name, arg2_val)
437
- #define TRACE_EVENT_END_WITH_FLAGS0(category_group, name, flags) \
438
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags)
439
- #define TRACE_EVENT_END_WITH_FLAGS1(category_group, name, flags, arg1_name, \
440
- arg1_val) \
441
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, flags, \
442
- arg1_name, arg1_val)
443
- #define TRACE_EVENT_COPY_END2(category_group, name, arg1_name, arg1_val, \
444
- arg2_name, arg2_val) \
445
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
446
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
447
- arg2_name, arg2_val)
448
-
449
- #define TRACE_EVENT_MARK_WITH_TIMESTAMP0(category_group, name, timestamp) \
450
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
451
- TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \
452
- TRACE_EVENT_FLAG_NONE)
453
-
454
- #define TRACE_EVENT_MARK_WITH_TIMESTAMP1(category_group, name, timestamp, \
455
- arg1_name, arg1_val) \
456
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
457
- TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \
458
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
459
-
460
- #define TRACE_EVENT_MARK_WITH_TIMESTAMP2( \
461
- category_group, name, timestamp, arg1_name, arg1_val, arg2_name, arg2_val) \
462
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
463
- TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \
464
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
465
-
466
- #define TRACE_EVENT_COPY_MARK(category_group, name) \
467
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \
468
- TRACE_EVENT_FLAG_COPY)
469
-
470
- #define TRACE_EVENT_COPY_MARK1(category_group, name, arg1_name, arg1_val) \
471
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_MARK, category_group, name, \
472
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
473
-
474
- #define TRACE_EVENT_COPY_MARK_WITH_TIMESTAMP(category_group, name, timestamp) \
475
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
476
- TRACE_EVENT_PHASE_MARK, category_group, name, timestamp, \
477
- TRACE_EVENT_FLAG_COPY)
478
-
479
- // Similar to TRACE_EVENT_ENDx but with a custom |at| timestamp provided.
480
- // - |id| is used to match the _BEGIN event with the _END event.
481
- // Events are considered to match if their category_group, name and id values
482
- // all match. |id| must either be a pointer or an integer value up to 64 bits.
483
- // If it's a pointer, the bits will be xored with a hash of the process ID so
484
- // that the same pointer on two different processes will not collide.
485
- #define TRACE_EVENT_END_WITH_ID_TID_AND_TIMESTAMP0(category_group, name, id, \
486
- thread_id, timestamp) \
487
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
488
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \
489
- timestamp, TRACE_EVENT_FLAG_NONE)
490
- #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \
491
- category_group, name, id, thread_id, timestamp) \
492
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
493
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \
494
- timestamp, TRACE_EVENT_FLAG_COPY)
495
- #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1( \
496
- category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \
497
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
498
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \
499
- timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
500
- #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2( \
501
- category_group, name, id, thread_id, timestamp, arg1_name, arg1_val, \
502
- arg2_name, arg2_val) \
503
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
504
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \
505
- timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \
506
- arg2_val)
507
-
508
- // Records the value of a counter called "name" immediately. Value
509
- // must be representable as a 32 bit integer.
510
- // - category and name strings must have application lifetime (statics or
511
- // literals). They may not include " chars.
512
- #define TRACE_COUNTER1(category_group, name, value) \
513
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \
514
- TRACE_EVENT_FLAG_NONE, "value", \
515
- static_cast<int>(value))
516
- #define TRACE_COUNTER_WITH_FLAG1(category_group, name, flag, value) \
517
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \
518
- flag, "value", static_cast<int>(value))
519
- #define TRACE_COPY_COUNTER1(category_group, name, value) \
520
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \
521
- TRACE_EVENT_FLAG_COPY, "value", \
522
- static_cast<int>(value))
523
-
524
- // Records the values of a multi-parted counter called "name" immediately.
525
- // The UI will treat value1 and value2 as parts of a whole, displaying their
526
- // values as a stacked-bar chart.
527
- // - category and name strings must have application lifetime (statics or
528
- // literals). They may not include " chars.
529
- #define TRACE_COUNTER2(category_group, name, value1_name, value1_val, \
530
- value2_name, value2_val) \
531
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \
532
- TRACE_EVENT_FLAG_NONE, value1_name, \
533
- static_cast<int>(value1_val), value2_name, \
534
- static_cast<int>(value2_val))
535
- #define TRACE_COPY_COUNTER2(category_group, name, value1_name, value1_val, \
536
- value2_name, value2_val) \
537
- INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, category_group, name, \
538
- TRACE_EVENT_FLAG_COPY, value1_name, \
539
- static_cast<int>(value1_val), value2_name, \
540
- static_cast<int>(value2_val))
541
-
542
- // Similar to TRACE_COUNTERx, but with a custom |timestamp| provided.
543
- #define TRACE_COUNTER_WITH_TIMESTAMP1(category_group, name, timestamp, value) \
544
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
545
- TRACE_EVENT_PHASE_COUNTER, category_group, name, timestamp, \
546
- TRACE_EVENT_FLAG_NONE, "value", static_cast<int>(value))
547
-
548
- #define TRACE_COUNTER_WITH_TIMESTAMP2(category_group, name, timestamp, \
549
- value1_name, value1_val, value2_name, \
550
- value2_val) \
551
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
552
- TRACE_EVENT_PHASE_COUNTER, category_group, name, timestamp, \
553
- TRACE_EVENT_FLAG_NONE, value1_name, static_cast<int>(value1_val), \
554
- value2_name, static_cast<int>(value2_val))
555
-
556
- // Records the value of a counter called "name" immediately. Value
557
- // must be representable as a 32 bit integer.
558
- // - category and name strings must have application lifetime (statics or
559
- // literals). They may not include " chars.
560
- // - |id| is used to disambiguate counters with the same name. It must either
561
- // be a pointer or an integer value up to 64 bits. If it's a pointer, the bits
562
- // will be xored with a hash of the process ID so that the same pointer on
563
- // two different processes will not collide.
564
- #define TRACE_COUNTER_ID1(category_group, name, id, value) \
565
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \
566
- name, id, TRACE_EVENT_FLAG_NONE, "value", \
567
- static_cast<int>(value))
568
- #define TRACE_COPY_COUNTER_ID1(category_group, name, id, value) \
569
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \
570
- name, id, TRACE_EVENT_FLAG_COPY, "value", \
571
- static_cast<int>(value))
572
-
573
- // Records the values of a multi-parted counter called "name" immediately.
574
- // The UI will treat value1 and value2 as parts of a whole, displaying their
575
- // values as a stacked-bar chart.
576
- // - category and name strings must have application lifetime (statics or
577
- // literals). They may not include " chars.
578
- // - |id| is used to disambiguate counters with the same name. It must either
579
- // be a pointer or an integer value up to 64 bits. If it's a pointer, the bits
580
- // will be xored with a hash of the process ID so that the same pointer on
581
- // two different processes will not collide.
582
- #define TRACE_COUNTER_ID2(category_group, name, id, value1_name, value1_val, \
583
- value2_name, value2_val) \
584
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \
585
- name, id, TRACE_EVENT_FLAG_NONE, \
586
- value1_name, static_cast<int>(value1_val), \
587
- value2_name, static_cast<int>(value2_val))
588
- #define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \
589
- value1_val, value2_name, value2_val) \
590
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, category_group, \
591
- name, id, TRACE_EVENT_FLAG_COPY, \
592
- value1_name, static_cast<int>(value1_val), \
593
- value2_name, static_cast<int>(value2_val))
594
-
595
- #define TRACE_EVENT_SAMPLE_WITH_ID1(category_group, name, id, arg1_name, \
596
- arg1_val) \
597
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_SAMPLE, category_group, \
598
- name, id, TRACE_EVENT_FLAG_NONE, arg1_name, \
599
- arg1_val)
600
-
601
- // -- TRACE_EVENT_ASYNC is DEPRECATED! --
602
- //
603
- // TRACE_EVENT_ASYNC_* APIs should be only used by legacy code. New code should
604
- // use TRACE_EVENT_NESTABLE_ASYNC_* APIs instead.
605
- //
606
- // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
607
- // associated arguments. If the category is not enabled, then this
608
- // does nothing.
609
- // - category and name strings must have application lifetime (statics or
610
- // literals). They may not include " chars.
611
- // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC
612
- // events are considered to match if their category_group, name and id values
613
- // all match. |id| must either be a pointer or an integer value up to 64 bits.
614
- // If it's a pointer, the bits will be xored with a hash of the process ID so
615
- // that the same pointer on two different processes will not collide.
616
- //
617
- // An asynchronous operation can consist of multiple phases. The first phase is
618
- // defined by the ASYNC_BEGIN calls. Additional phases can be defined using the
619
- // ASYNC_STEP_INTO or ASYNC_STEP_PAST macros. The ASYNC_STEP_INTO macro will
620
- // annotate the block following the call. The ASYNC_STEP_PAST macro will
621
- // annotate the block prior to the call. Note that any particular event must use
622
- // only STEP_INTO or STEP_PAST macros; they can not mix and match. When the
623
- // operation completes, call ASYNC_END.
624
- //
625
- // An ASYNC trace typically occurs on a single thread (if not, they will only be
626
- // drawn on the thread defined in the ASYNC_BEGIN event), but all events in that
627
- // operation must use the same |name| and |id|. Each step can have its own
628
- // args.
629
- #define TRACE_EVENT_ASYNC_BEGIN0(category_group, name, id) \
630
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \
631
- category_group, name, id, \
632
- TRACE_EVENT_FLAG_NONE)
633
- #define TRACE_EVENT_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
634
- arg1_val) \
635
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \
636
- category_group, name, id, \
637
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
638
- #define TRACE_EVENT_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
639
- arg1_val, arg2_name, arg2_val) \
640
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
641
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
642
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
643
- #define TRACE_EVENT_COPY_ASYNC_BEGIN0(category_group, name, id) \
644
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \
645
- category_group, name, id, \
646
- TRACE_EVENT_FLAG_COPY)
647
- #define TRACE_EVENT_COPY_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
648
- arg1_val) \
649
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \
650
- category_group, name, id, \
651
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
652
- #define TRACE_EVENT_COPY_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
653
- arg1_val, arg2_name, arg2_val) \
654
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
655
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
656
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val)
657
-
658
- // Similar to TRACE_EVENT_ASYNC_BEGINx but with a custom |at| timestamp
659
- // provided.
660
- #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \
661
- timestamp) \
662
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
663
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
664
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE)
665
- #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( \
666
- category_group, name, id, timestamp, arg1_name, arg1_val) \
667
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
668
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
669
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
670
- arg1_name, arg1_val)
671
- #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP2(category_group, name, id, \
672
- timestamp, arg1_name, \
673
- arg1_val, arg2_name, arg2_val) \
674
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
675
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
676
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
677
- arg1_name, arg1_val, arg2_name, arg2_val)
678
- #define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \
679
- timestamp) \
680
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
681
- TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \
682
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
683
-
684
- // Records a single ASYNC_STEP_INTO event for |step| immediately. If the
685
- // category is not enabled, then this does nothing. The |name| and |id| must
686
- // match the ASYNC_BEGIN event above. The |step| param identifies this step
687
- // within the async event. This should be called at the beginning of the next
688
- // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
689
- // ASYNC_STEP_PAST events.
690
- #define TRACE_EVENT_ASYNC_STEP_INTO0(category_group, name, id, step) \
691
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \
692
- category_group, name, id, \
693
- TRACE_EVENT_FLAG_NONE, "step", step)
694
- #define TRACE_EVENT_ASYNC_STEP_INTO1(category_group, name, id, step, \
695
- arg1_name, arg1_val) \
696
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
697
- TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \
698
- TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val)
699
-
700
- // Similar to TRACE_EVENT_ASYNC_STEP_INTOx but with a custom |at| timestamp
701
- // provided.
702
- #define TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(category_group, name, id, \
703
- step, timestamp) \
704
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
705
- TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \
706
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
707
- "step", step)
708
-
709
- // Records a single ASYNC_STEP_PAST event for |step| immediately. If the
710
- // category is not enabled, then this does nothing. The |name| and |id| must
711
- // match the ASYNC_BEGIN event above. The |step| param identifies this step
712
- // within the async event. This should be called at the beginning of the next
713
- // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
714
- // ASYNC_STEP_INTO events.
715
- #define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \
716
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \
717
- category_group, name, id, \
718
- TRACE_EVENT_FLAG_NONE, "step", step)
719
- #define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \
720
- arg1_name, arg1_val) \
721
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
722
- TRACE_EVENT_PHASE_ASYNC_STEP_PAST, category_group, name, id, \
723
- TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val)
724
-
725
- // Records a single ASYNC_END event for "name" immediately. If the category
726
- // is not enabled, then this does nothing.
727
- #define TRACE_EVENT_ASYNC_END0(category_group, name, id) \
728
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \
729
- category_group, name, id, \
730
- TRACE_EVENT_FLAG_NONE)
731
- #define TRACE_EVENT_ASYNC_END1(category_group, name, id, arg1_name, arg1_val) \
732
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \
733
- category_group, name, id, \
734
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
735
- #define TRACE_EVENT_ASYNC_END2(category_group, name, id, arg1_name, arg1_val, \
736
- arg2_name, arg2_val) \
737
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
738
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
739
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
740
- #define TRACE_EVENT_COPY_ASYNC_END0(category_group, name, id) \
741
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \
742
- category_group, name, id, \
743
- TRACE_EVENT_FLAG_COPY)
744
- #define TRACE_EVENT_COPY_ASYNC_END1(category_group, name, id, arg1_name, \
745
- arg1_val) \
746
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \
747
- category_group, name, id, \
748
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
749
- #define TRACE_EVENT_COPY_ASYNC_END2(category_group, name, id, arg1_name, \
750
- arg1_val, arg2_name, arg2_val) \
751
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
752
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
753
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val)
754
-
755
- // Similar to TRACE_EVENT_ASYNC_ENDx but with a custom |at| timestamp provided.
756
- #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id, \
757
- timestamp) \
758
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
759
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
760
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE)
761
- #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP1(category_group, name, id, \
762
- timestamp, arg1_name, arg1_val) \
763
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
764
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
765
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
766
- arg1_name, arg1_val)
767
- #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP2(category_group, name, id, \
768
- timestamp, arg1_name, arg1_val, \
769
- arg2_name, arg2_val) \
770
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
771
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
772
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
773
- arg1_name, arg1_val, arg2_name, arg2_val)
774
- #define TRACE_EVENT_COPY_ASYNC_END_WITH_TIMESTAMP0(category_group, name, id, \
775
- timestamp) \
776
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
777
- TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \
778
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
779
-
780
- // NESTABLE_ASYNC_* APIs are used to describe an async operation, which can
781
- // be nested within a NESTABLE_ASYNC event and/or have inner NESTABLE_ASYNC
782
- // events.
783
- // - category and name strings must have application lifetime (statics or
784
- // literals). They may not include " chars.
785
- // - A pair of NESTABLE_ASYNC_BEGIN event and NESTABLE_ASYNC_END event is
786
- // considered as a match if their category_group, name and id all match.
787
- // - |id| must either be a pointer or an integer value up to 64 bits.
788
- // If it's a pointer, the bits will be xored with a hash of the process ID so
789
- // that the same pointer on two different processes will not collide.
790
- // - |id| is used to match a child NESTABLE_ASYNC event with its parent
791
- // NESTABLE_ASYNC event. Therefore, events in the same nested event tree must
792
- // be logged using the same id and category_group.
793
- //
794
- // Unmatched NESTABLE_ASYNC_END event will be parsed as an event that starts
795
- // at the first NESTABLE_ASYNC event of that id, and unmatched
796
- // NESTABLE_ASYNC_BEGIN event will be parsed as an event that ends at the last
797
- // NESTABLE_ASYNC event of that id. Corresponding warning messages for
798
- // unmatched events will be shown in the analysis view.
799
-
800
- // Records a single NESTABLE_ASYNC_BEGIN event called "name" immediately, with
801
- // 0, 1 or 2 associated arguments. If the category is not enabled, then this
802
- // does nothing.
803
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \
804
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \
805
- category_group, name, id, \
806
- TRACE_EVENT_FLAG_NONE)
807
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
808
- arg1_val) \
809
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \
810
- category_group, name, id, \
811
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
812
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \
813
- arg1_val, arg2_name, arg2_val) \
814
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
815
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
816
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
817
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_FLAGS0(category_group, name, id, \
818
- flags) \
819
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \
820
- category_group, name, id, flags)
821
- // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 0
822
- // or 2 associated arguments. If the category is not enabled, then this does
823
- // nothing.
824
- #define TRACE_EVENT_NESTABLE_ASYNC_END0(category_group, name, id) \
825
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
826
- category_group, name, id, \
827
- TRACE_EVENT_FLAG_NONE)
828
- // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 1
829
- // associated argument. If the category is not enabled, then this does nothing.
830
- #define TRACE_EVENT_NESTABLE_ASYNC_END1(category_group, name, id, arg1_name, \
831
- arg1_val) \
832
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
833
- category_group, name, id, \
834
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
835
- #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \
836
- arg1_val, arg2_name, arg2_val) \
837
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
838
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
839
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
840
- #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_FLAGS0(category_group, name, id, \
841
- flags) \
842
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
843
- category_group, name, id, flags)
844
-
845
- // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
846
- // with none, one or two associated argument. If the category is not enabled,
847
- // then this does nothing.
848
- #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT0(category_group, name, id) \
849
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
850
- category_group, name, id, \
851
- TRACE_EVENT_FLAG_NONE)
852
-
853
- #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \
854
- arg1_name, arg1_val) \
855
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
856
- category_group, name, id, \
857
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
858
-
859
- #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \
860
- category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
861
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
862
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
863
- TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
864
-
865
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \
866
- category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
867
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
868
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
869
- TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
870
- arg2_name, arg2_val)
871
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2( \
872
- category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \
873
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
874
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
875
- TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
876
- arg2_name, arg2_val)
877
-
878
- // Similar to TRACE_EVENT_NESTABLE_ASYNC_{BEGIN,END}x but with a custom
879
- // |timestamp| provided.
880
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \
881
- id, timestamp) \
882
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
883
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
884
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE)
885
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP1( \
886
- category_group, name, id, timestamp, arg1_name, arg1_val) \
887
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
888
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
889
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
890
- arg1_name, arg1_val)
891
- #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP_AND_FLAGS0( \
892
- category_group, name, id, timestamp, flags) \
893
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
894
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
895
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, flags)
896
- #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP0(category_group, name, \
897
- id, timestamp) \
898
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
899
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
900
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE)
901
- #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP1( \
902
- category_group, name, id, timestamp, arg1_name, arg1_val) \
903
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
904
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
905
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
906
- arg1_name, arg1_val)
907
- #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP2( \
908
- category_group, name, id, timestamp, arg1_name, arg1_val, arg2_name, \
909
- arg2_val) \
910
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
911
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
912
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
913
- arg1_name, arg1_val, arg2_name, arg2_val)
914
- #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP_AND_FLAGS0( \
915
- category_group, name, id, timestamp, flags) \
916
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
917
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
918
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, flags)
919
- #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT_WITH_TIMESTAMP0( \
920
- category_group, name, id, timestamp) \
921
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
922
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \
923
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE)
924
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \
925
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \
926
- category_group, name, id, \
927
- TRACE_EVENT_FLAG_COPY)
928
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END0(category_group, name, id) \
929
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
930
- category_group, name, id, \
931
- TRACE_EVENT_FLAG_COPY)
932
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0( \
933
- category_group, name, id, timestamp) \
934
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
935
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
936
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
937
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \
938
- category_group, name, id, timestamp) \
939
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
940
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
941
- TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
942
- #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END1(category_group, name, id, \
943
- arg1_name, arg1_val) \
944
- INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
945
- category_group, name, id, \
946
- TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
947
-
948
- // Special trace event macro to trace task execution with the location where it
949
- // was posted from.
950
- #define TRACE_TASK_EXECUTION(run_function, task) \
951
- INTERNAL_TRACE_TASK_EXECUTION(run_function, task)
952
-
953
- // Special trace event macro to trace log messages.
954
- #define TRACE_LOG_MESSAGE(file, message, line) \
955
- INTERNAL_TRACE_LOG_MESSAGE(file, message, line)
956
-
957
- // TRACE_EVENT_METADATA* events are information related to other
958
- // injected events, not events in their own right.
959
- #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \
960
- INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val)
961
-
962
- // Records a clock sync event.
963
- #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \
964
- INTERNAL_TRACE_EVENT_ADD( \
965
- TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \
966
- TRACE_EVENT_FLAG_NONE, "sync_id", sync_id)
967
- #define TRACE_EVENT_CLOCK_SYNC_ISSUER(sync_id, issue_ts, issue_end_ts) \
968
- INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \
969
- TRACE_EVENT_PHASE_CLOCK_SYNC, "__metadata", "clock_sync", \
970
- issue_end_ts, TRACE_EVENT_FLAG_NONE, \
971
- "sync_id", sync_id, "issue_ts", issue_ts)
972
-
973
- // Macros to track the life time and value of arbitrary client objects.
974
- // See also TraceTrackableObject.
975
- #define TRACE_EVENT_OBJECT_CREATED_WITH_ID(category_group, name, id) \
976
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
977
- TRACE_EVENT_PHASE_CREATE_OBJECT, category_group, name, id, \
978
- TRACE_EVENT_FLAG_NONE)
979
-
980
- #define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(category_group, name, id, \
981
- snapshot) \
982
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
983
- TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, category_group, name, \
984
- id, TRACE_EVENT_FLAG_NONE, "snapshot", snapshot)
985
-
986
- #define TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID_AND_TIMESTAMP( \
987
- category_group, name, id, timestamp, snapshot) \
988
- INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
989
- TRACE_EVENT_PHASE_SNAPSHOT_OBJECT, category_group, name, \
990
- id, TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \
991
- "snapshot", snapshot)
992
-
993
- #define TRACE_EVENT_OBJECT_DELETED_WITH_ID(category_group, name, id) \
994
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
995
- TRACE_EVENT_PHASE_DELETE_OBJECT, category_group, name, id, \
996
- TRACE_EVENT_FLAG_NONE)
997
-
998
- // Records entering and leaving trace event contexts. |category_group| and
999
- // |name| specify the context category and type. |context| is a
1000
- // snapshotted context object id.
1001
- #define TRACE_EVENT_ENTER_CONTEXT(category_group, name, context) \
1002
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
1003
- TRACE_EVENT_PHASE_ENTER_CONTEXT, category_group, name, context, \
1004
- TRACE_EVENT_FLAG_NONE)
1005
- #define TRACE_EVENT_LEAVE_CONTEXT(category_group, name, context) \
1006
- INTERNAL_TRACE_EVENT_ADD_WITH_ID( \
1007
- TRACE_EVENT_PHASE_LEAVE_CONTEXT, category_group, name, context, \
1008
- TRACE_EVENT_FLAG_NONE)
1009
-
1010
- // Macro to efficiently determine if a given category group is enabled.
1011
- #define TRACE_EVENT_CATEGORY_GROUP_ENABLED(category_group, ret) \
1012
- do { \
1013
- INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
1014
- if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
1015
- *ret = true; \
1016
- } else { \
1017
- *ret = false; \
1018
- } \
1019
- } while (0)
1020
-
1021
- // Macro to efficiently determine, through polling, if a new trace has begun.
1022
- #define TRACE_EVENT_IS_NEW_TRACE(ret) \
1023
- do { \
1024
- static int INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = 0; \
1025
- int num_traces_recorded = TRACE_EVENT_API_GET_NUM_TRACES_RECORDED(); \
1026
- if (num_traces_recorded != -1 && \
1027
- num_traces_recorded != \
1028
- INTERNAL_TRACE_EVENT_UID(lastRecordingNumber)) { \
1029
- INTERNAL_TRACE_EVENT_UID(lastRecordingNumber) = num_traces_recorded; \
1030
- *ret = true; \
1031
- } else { \
1032
- *ret = false; \
1033
- } \
1034
- } while (0)
1035
-
1036
- // Macro for getting the real base::TimeTicks::Now() which can be overridden in
1037
- // headless when VirtualTime is enabled.
1038
- #define TRACE_TIME_TICKS_NOW() INTERNAL_TRACE_TIME_TICKS_NOW()
1039
-
1040
- // Macro for getting the real base::Time::Now() which can be overridden in
1041
- // headless when VirtualTime is enabled.
1042
- #define TRACE_TIME_NOW() INTERNAL_TRACE_TIME_NOW()
1043
-
1044
- // Notes regarding the following definitions:
1045
- // New values can be added and propagated to third party libraries, but existing
1046
- // definitions must never be changed, because third party libraries may use old
1047
- // definitions.
1048
-
1049
- // Phase indicates the nature of an event entry. E.g. part of a begin/end pair.
1050
- #define TRACE_EVENT_PHASE_BEGIN ('B')
1051
- #define TRACE_EVENT_PHASE_END ('E')
1052
- #define TRACE_EVENT_PHASE_COMPLETE ('X')
1053
- #define TRACE_EVENT_PHASE_INSTANT ('I')
1054
- #define TRACE_EVENT_PHASE_ASYNC_BEGIN ('S')
1055
- #define TRACE_EVENT_PHASE_ASYNC_STEP_INTO ('T')
1056
- #define TRACE_EVENT_PHASE_ASYNC_STEP_PAST ('p')
1057
- #define TRACE_EVENT_PHASE_ASYNC_END ('F')
1058
- #define TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN ('b')
1059
- #define TRACE_EVENT_PHASE_NESTABLE_ASYNC_END ('e')
1060
- #define TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT ('n')
1061
- #define TRACE_EVENT_PHASE_FLOW_BEGIN ('s')
1062
- #define TRACE_EVENT_PHASE_FLOW_STEP ('t')
1063
- #define TRACE_EVENT_PHASE_FLOW_END ('f')
1064
- #define TRACE_EVENT_PHASE_METADATA ('M')
1065
- #define TRACE_EVENT_PHASE_COUNTER ('C')
1066
- #define TRACE_EVENT_PHASE_SAMPLE ('P')
1067
- #define TRACE_EVENT_PHASE_CREATE_OBJECT ('N')
1068
- #define TRACE_EVENT_PHASE_SNAPSHOT_OBJECT ('O')
1069
- #define TRACE_EVENT_PHASE_DELETE_OBJECT ('D')
1070
- #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v')
1071
- #define TRACE_EVENT_PHASE_MARK ('R')
1072
- #define TRACE_EVENT_PHASE_CLOCK_SYNC ('c')
1073
- #define TRACE_EVENT_PHASE_ENTER_CONTEXT ('(')
1074
- #define TRACE_EVENT_PHASE_LEAVE_CONTEXT (')')
1075
-
1076
- // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT.
1077
- #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned int>(0))
1078
- #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned int>(1 << 0))
1079
- #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned int>(1 << 1))
1080
- #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned int>(1 << 2))
1081
- #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned int>(1 << 3))
1082
- #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned int>(1 << 4))
1083
- #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned int>(1 << 5))
1084
- #define TRACE_EVENT_FLAG_BIND_TO_ENCLOSING (static_cast<unsigned int>(1 << 6))
1085
- #define TRACE_EVENT_FLAG_FLOW_IN (static_cast<unsigned int>(1 << 7))
1086
- #define TRACE_EVENT_FLAG_FLOW_OUT (static_cast<unsigned int>(1 << 8))
1087
- #define TRACE_EVENT_FLAG_HAS_CONTEXT_ID (static_cast<unsigned int>(1 << 9))
1088
- #define TRACE_EVENT_FLAG_HAS_PROCESS_ID (static_cast<unsigned int>(1 << 10))
1089
- #define TRACE_EVENT_FLAG_HAS_LOCAL_ID (static_cast<unsigned int>(1 << 11))
1090
- #define TRACE_EVENT_FLAG_HAS_GLOBAL_ID (static_cast<unsigned int>(1 << 12))
1091
- // TODO(eseckler): Remove once we have native support for typed proto events in
1092
- // TRACE_EVENT macros.
1093
- #define TRACE_EVENT_FLAG_TYPED_PROTO_ARGS (static_cast<unsigned int>(1 << 15))
1094
- #define TRACE_EVENT_FLAG_JAVA_STRING_LITERALS \
1095
- (static_cast<unsigned int>(1 << 16))
1096
-
1097
- #define TRACE_EVENT_FLAG_SCOPE_MASK \
1098
- (static_cast<unsigned int>(TRACE_EVENT_FLAG_SCOPE_OFFSET | \
1099
- TRACE_EVENT_FLAG_SCOPE_EXTRA))
1100
-
1101
- // Type values for identifying types in the TraceValue union.
1102
- #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1))
1103
- #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2))
1104
- #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3))
1105
- #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4))
1106
- #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5))
1107
- #define TRACE_VALUE_TYPE_STRING (static_cast<unsigned char>(6))
1108
- #define TRACE_VALUE_TYPE_COPY_STRING (static_cast<unsigned char>(7))
1109
- #define TRACE_VALUE_TYPE_CONVERTABLE (static_cast<unsigned char>(8))
1110
- #define TRACE_VALUE_TYPE_PROTO (static_cast<unsigned char>(9))
1111
-
1112
- // Enum reflecting the scope of an INSTANT event. Must fit within
1113
- // TRACE_EVENT_FLAG_SCOPE_MASK.
1114
- #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 2))
1115
- #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 2))
1116
- #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 2))
1117
-
1118
- #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1119
- #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1120
- #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
1121
-
1122
- #endif // !defined(BASE_USE_PERFETTO_CLIENT_LIBRARY)
1123
- #endif // BASE_TRACE_EVENT_COMMON_TRACE_EVENT_COMMON_H_