v8/include
Peter Marshall d365f62ec1 [tracing] Add a way to test perfetto traces.
Add a new abstract class TraceEventListener which is just an interface
for consuming trace events. This separates the V8-specific stuff that
an actual perfetto consumer needs to do e.g. handling the has_more flag
and signalling back to the controller with a semaphore.

This is a change from the previous plan of making the PerfettoConsumer
class sub-classable to implement custom consumption of trace events.
This will be difficult when the consumer is created outside of the
PerfettoTracingController as we can't hook up the
consumer_finished_semaphore_ that belongs to the controller.

Now the PerfettoTracingController is responsible for the Consumer life-
cycle and hides it entirely from callers. We add the
AddTraceEventListener() method to allow callers to register a listener
either for testing or a JSON listener for real tracing.

This lets us write tests that can store all the trace events in memory
without first converting them to JSON, letting us write test more
easily. There's an example test add to test-tracing - more tests using
this style will follow.

Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Bug: v8:8339
Change-Id: I2d2b0f408b1c7bed954144163e1968f40d772c1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628789
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61854}
2019-05-27 14:28:36 +00:00
..
libplatform [tracing] Add a way to test perfetto traces. 2019-05-27 14:28:36 +00:00
APIDesign.md Replace <> with &lt;&gt; in md docs 2017-06-12 10:09:12 +00:00
DEPS [inspector] Build inspector under v8_enable_inspector build flag. 2016-09-06 23:26:35 +00:00
OWNERS [ptr-compr] Add gn arg for 31bit Smis on 64bit arch 2018-10-24 13:26:35 +00:00
v8-inspector-protocol.h [inspector] Build inspector under v8_enable_inspector build flag. 2016-09-06 23:26:35 +00:00
v8-inspector.h [DevTools] Switch inspector-test.cc to use the CBOR encoded inspector state. 2019-05-15 15:58:12 +00:00
v8-internal.h [cleanup] Better implementation of SmiTagging<4>::IsValidSmi() 2019-05-10 10:39:43 +00:00
v8-platform.h make deleted functions public in include 2019-05-13 07:58:31 +00:00
v8-profiler.h [cpu-profiler] Remove redundant record_samples option 2019-05-22 06:12:24 +00:00
v8-testing.h Remove easy to remove calls to Isolate::Current() from api.cc 2015-11-30 08:16:59 +00:00
v8-util.h Reland "[api,heap] Remove deprecated Persistent APIs" 2019-04-24 09:34:27 +00:00
v8-value-serializer-version.h Expose the ValueSerializer data format version as a compile-time constant. 2017-04-27 15:14:41 +00:00
v8-version-string.h [build] Fix V8_VERSION_STRING with embedder string 2017-10-23 14:31:52 +00:00
v8-version.h Update master version to 7.6. 2019-04-18 08:14:42 +00:00
v8-wasm-trap-handler-posix.h [api] Fix includes in trap handler API header files 2019-01-16 15:15:52 +00:00
v8-wasm-trap-handler-win.h [api] Fix includes in trap handler API header files 2019-01-16 15:15:52 +00:00
v8.h [api] Remove obsolete FunctionTemplate::SetHiddenPrototype(). 2019-05-23 09:05:56 +00:00
v8config.h [build] Add iOS detection 2019-04-17 08:53:35 +00:00