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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 965593002: Improved profiler view and inclusive profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 684931632eb754dd25883d9927e4617a9c707279..d1a132da698af8c858010ed03329af5915479ade 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1803,8 +1803,10 @@ class FunctionKind {
final String _strValue;
FunctionKind._internal(this._strValue);
toString() => _strValue;
- bool isSynthetic() => [kCollected, kNative, kTag, kReused].contains(this);
-
+ bool isSynthetic() => [kCollected, kNative, kStub, kTag].contains(this);
+ bool isDart() => !isSynthetic();
+ bool isStub() => (this == kStub);
+ bool hasDartCode() => isDart() || isStub();
static FunctionKind fromJSON(String value) {
switch(value) {
case 'kRegularFunction': return kRegularFunction;
@@ -1814,16 +1816,19 @@ class FunctionKind {
case 'kConstructor': return kConstructor;
case 'kImplicitGetter': return kImplicitGetterFunction;
case 'kImplicitSetter': return kImplicitSetterFunction;
+ case 'kImplicitStaticFinalGetter': return kImplicitStaticFinalGetter;
+ case 'kIrregexpFunction': return kIrregexpFunction;
case 'kStaticInitializer': return kStaticInitializer;
case 'kMethodExtractor': return kMethodExtractor;
case 'kNoSuchMethodDispatcher': return kNoSuchMethodDispatcher;
case 'kInvokeFieldDispatcher': return kInvokeFieldDispatcher;
case 'Collected': return kCollected;
case 'Native': return kNative;
+ case 'Stub': return kStub;
case 'Tag': return kTag;
- case 'Reused': return kReused;
}
- return kUNKNOWN;
+ print('did not understand $value');
+ throw new FallThroughError();
}
static FunctionKind kRegularFunction = new FunctionKind._internal('function');
@@ -1833,6 +1838,8 @@ class FunctionKind {
static FunctionKind kConstructor = new FunctionKind._internal('constructor');
static FunctionKind kImplicitGetterFunction = new FunctionKind._internal('implicit getter function');
static FunctionKind kImplicitSetterFunction = new FunctionKind._internal('implicit setter function');
+ static FunctionKind kImplicitStaticFinalGetter = new FunctionKind._internal('implicit static final getter');
+ static FunctionKind kIrregexpFunction = new FunctionKind._internal('ir regexp function');
static FunctionKind kStaticInitializer = new FunctionKind._internal('static initializer');
static FunctionKind kMethodExtractor = new FunctionKind._internal('method extractor');
static FunctionKind kNoSuchMethodDispatcher = new FunctionKind._internal('noSuchMethod dispatcher');
@@ -1840,7 +1847,7 @@ class FunctionKind {
static FunctionKind kCollected = new FunctionKind._internal('Collected');
static FunctionKind kNative = new FunctionKind._internal('Native');
static FunctionKind kTag = new FunctionKind._internal('Tag');
- static FunctionKind kReused = new FunctionKind._internal('Reused');
+ static FunctionKind kStub = new FunctionKind._internal('Stub');
static FunctionKind kUNKNOWN = new FunctionKind._internal('UNKNOWN');
}
@@ -2339,7 +2346,8 @@ class CodeKind {
final _value;
const CodeKind._internal(this._value);
String toString() => '$_value';
-
+ bool isSynthetic() => [Collected, Native, Tag].contains(this);
+ bool isDart() => !isSynthetic();
static CodeKind fromString(String s) {
if (s == 'Native') {
return Native;
@@ -2347,18 +2355,17 @@ class CodeKind {
return Dart;
} else if (s == 'Collected') {
return Collected;
- } else if (s == 'Reused') {
- return Reused;
} else if (s == 'Tag') {
return Tag;
+ } else if (s == 'Stub') {
+ return Stub;
}
- Logger.root.warning('Unknown code kind $s');
throw new FallThroughError();
}
- static const Native = const CodeKind._internal('Native');
- static const Dart = const CodeKind._internal('Dart');
static const Collected = const CodeKind._internal('Collected');
- static const Reused = const CodeKind._internal('Reused');
+ static const Dart = const CodeKind._internal('Dart');
+ static const Native = const CodeKind._internal('Native');
+ static const Stub = const CodeKind._internal('Stub');
static const Tag = const CodeKind._internal('Tag');
}
@@ -2567,7 +2574,8 @@ class Code extends ServiceObject {
return (address >= startAddress) && (address < endAddress);
}
- @reflectable bool get isDartCode => kind == CodeKind.Dart;
+ @reflectable bool get isDartCode => (kind == CodeKind.Dart) ||
+ (kind == CodeKind.Stub);
}

Powered by Google App Engine
This is Rietveld 408576698