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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory/isolate.dart

Issue 135843006: Improve Code object support in service and observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
Index: runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
index d4338dce0f75f14a3f6fe1277663bf8fe5306048..2117d8319cf75dbb8b2fba4a073aa233bb716832 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
@@ -6,7 +6,8 @@ part of observatory;
/// State for a running isolate.
class Isolate extends Observable {
- @observable dprof.Isolate profiler;
+ @observable Profile profile;
+ @observable final List<Code> codes = new List<Code>();
@observable String id;
@observable String name;
@observable final Map<String, ScriptSource> scripts =
@@ -15,4 +16,27 @@ class Isolate extends Observable {
Isolate(this.id, this.name);
String toString() => '$id $name';
-}
+
+ Code findCodeByAddress(int address) {
+ for (var i = 0; i < codes.length; i++) {
+ if (codes[i].contains(address)) {
+ return codes[i];
+ }
+ }
+ }
+
+ Code findCodeByName(String name) {
+ for (var i = 0; i < codes.length; i++) {
+ if (codes[i].name == name) {
+ return codes[i];
+ }
+ }
+ }
+
+ void resetCodeTicks() {
+ Logger.root.info('Reset all code ticks.');
+ for (var i = 0; i < codes.length; i++) {
+ codes[i].resetTicks();
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698