This reverts commit f06348108a.
Reason for revert: Flutter engine shell tests are timing out
Original change's description:
> [ VM ] Update Timeline tests to not use recorder->Clear()
>
> Also added IsOwnedByCurrentThread() assert for ReclaimCachedBlocksFromThreadsLocked
>
> Follow up to a62e144882
>
> TEST=runtime/vm/timeline_test.cc
>
> Change-Id: Iec3597b407d99ada1894752f7150a9ae4025bf91
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192243
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Id7ba866d7966743bc54659a5d2a632eb31bbf355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192481
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Allows categories to be selected through arguments to `trace` instead of changing VM flags and rebuilding.
Change-Id: Ia1ec6b58ca0b765c3d675b7d4938acc5f624b768
Reviewed-on: https://dart-review.googlesource.com/c/91860
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- Rename TimelineEventStreamingRecorder to TimelineEventCallbackRecorder. Note that this should only be used for tests.
- Add 'Timeline' service event stream.
- Send a 'TimelineEvents' event on the 'Timeline' stream whenever a TimelineEventBlock is finished and the 'Timeline' stream is subscribed to.
- Simple service protocol test.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1765563002 .
fields in a thread (i.e fields that are not Dart VM related)
- Split the Thread structure to be a pure Dart per thread structure and add
a pointer to os_thread which points to the OSThread structure
- Change Schedule/UnSchedule to set the Dart Thread structure as the TLS of
the thread when it is inside the Dart world and reset the TLS back to the
OSThread strcuture when is exits the Dart World.
- Moved the stack_base and few stack size related functions to OSThread from Isolate
R=johnmccutchan@google.com, zra@google.com
Review URL: https://codereview.chromium.org/1439483003 .
- Blocks are associated with threads and not isolates.
- Fix isolate filters when iterating over blocks and events.
- Always add the isolateNumber argument when serializing events.
- Add new (kSerializedJSON) EventType for events already serialized to JSON.
- Have events coming from Dart code use the standard event structure w/ type = kSerializedJSON.
- Remove now unused DartTimelineEvent and machinary.
- Dart and C++ events now use the same structures and system.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1411783004 .
Due to the need to reclaim TimelineEventBlocks from the system, it is not safe to hold onto a TimelineEvent other than briefly to fill it out.
- Switch TimelineDurationScope to emit two events (begin, end) instead of one duration event.
- When setting duration arguments, hold them in the TimelineDurationScope and then emit them with the end event.
The above two changes allows TimelineDurationScope to work without holding onto a TimelineEvent.
To stop the block from being reclaimed while we are filling out an event, calls to StartEvent return with a lock held that is unlocked when CompleteEvent is called.
- Update tests.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1395803002 .
- Add support for begin and end even kinds.
- Update TimelineAnalysis to properly account for begin and end events as well as duration events.
- Add unit test for analysis of timelines with begin and end events.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1386263002 .
- This CL only adds support for synchronous blocks of time. A follow up CL will add asynchronous blocks of time.
- Reports true thread id to tracing system. This is an improvement over Mojo's tracing helper.
- Dart events are included in individual isolate traces and global traces obtained via the embedders API.
- Dart events are included in the write to disk path (--timeline_dir).
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1377663002 .
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
- Initialize and shutdown timeline recorder with VM.
- Allocate global blocks for timeline events without an isolate.
- Stop storing the Stream pointer inside a TimelineEvent.
- Store category name in TimelineEvent.
- Store isolate pointer in TimelineEvent.
- TimelineEventRecorder::WriteTo is full VM dump.
- Allow JSONStream to be used without an isolate.
- When a ThreadRegistry is deleted, Finish all open timeline blocks.
- PrintJSON takes a filter.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1294023009 .
- Add TimelineEventBlockIterator - iterate over TimelineEventBlocks.
- Add TimelineAnalysisThread - All events for a specific thread.
- Add TimelineAnalysis - Utility for analyzing timeline events.
- Add unit test for TimelineAnalysis thread discovery and block sorting.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1284263002 .
- Each isolate has its own TimelineEventBuffer
- Each isolate has TimelineEventStreams for API, Compiler, Embedder, Isolate, and GC
- Compiler, Isolate, Embedder, and GC are being inserted into the stream
- Basic unit tests
- Dart API for injecting timeline events
- Arbitrary number of native and Dart arguments can be attached to each event
- JSON printing
- Output can be loaded by about://tracing
- Add --timeline-trace-dir flag
Short term follow up CLS:
- Service protocol requests to enable / disable tracing and retrieve a trace
- UI for Observatory
- Dart code EventStreams and Events
R=asiva@google.com
Review URL: https://codereview.chromium.org//1170503004.