Files
sdk/runtime/bin/isolate_data.h
T
John McCutchan c7187924a9 Initial Timeline Events
- 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.
2015-06-16 10:10:14 -07:00

51 lines
1.2 KiB
C++

// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef BIN_ISOLATE_DATA_H_
#define BIN_ISOLATE_DATA_H_
#include "include/dart_api.h"
#include "platform/globals.h"
namespace dart {
namespace bin {
// Forward declaration.
class EventHandler;
// Data associated with every isolate in the standalone VM
// embedding. This is used to free external resources for each isolate
// when the isolate shuts down.
class IsolateData {
public:
explicit IsolateData(const char* url, const char* package_root)
: script_url(strdup(url)),
package_root(NULL),
udp_receive_buffer(NULL),
load_async_id(-1) {
if (package_root != NULL) {
this->package_root = strdup(package_root);
}
}
~IsolateData() {
free(script_url);
free(package_root);
free(udp_receive_buffer);
}
char* script_url;
char* package_root;
uint8_t* udp_receive_buffer;
int64_t load_async_id;
private:
DISALLOW_COPY_AND_ASSIGN(IsolateData);
};
} // namespace bin
} // namespace dart
#endif // BIN_ISOLATE_DATA_H_