Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: sdk/lib/developer/timeline.dart

Issue 1411783004: More timeline cleanups (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/developer_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/developer/timeline.dart
diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart
index c42e5c0052bc0cce81f854ab901ff45b0ab4ab5d..1c9e3d86d63ce74a85b04a5dc82b3eb391be7d78 100644
--- a/sdk/lib/developer/timeline.dart
+++ b/sdk/lib/developer/timeline.dart
@@ -50,6 +50,8 @@ class Timeline {
}
static final List<_SyncBlock> _stack = new List<_SyncBlock>();
+
+ static final int _isolateId = _getIsolateNum();
}
/// An asynchronous task on the timeline. Asynchronous tasks can live
@@ -133,6 +135,7 @@ class AsyncBlock {
// Emit the start event.
void _start() {
+ arguments['isolateNumber'] = Timeline._isolateId;
String argumentsAsJson = JSON.encode(arguments);
_reportTaskEvent(_getTraceClock(),
_taskId,
@@ -197,6 +200,8 @@ class _SyncBlock {
void finish() {
var end = _getTraceClock();
+ arguments['isolateNumber'] = Timeline._isolateId;
+
// Encode arguments map as JSON before reporting.
var argumentsAsJson = JSON.encode(arguments);
@@ -215,6 +220,9 @@ external int _getNextAsyncId();
/// Returns the current value from the trace clock.
external int _getTraceClock();
+/// Returns the isolate's main port number.
+external int _getIsolateNum();
+
/// Reports an event for a task.
external void _reportTaskEvent(int start,
int taskId,
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/developer_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698