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

Unified Diff: runtime/observatory/lib/src/models/objects/function.dart

Issue 2273993002: Converted Observatory cpu-profile-table element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed comments Created 4 years, 4 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/models/objects/function.dart
diff --git a/runtime/observatory/lib/src/models/objects/function.dart b/runtime/observatory/lib/src/models/objects/function.dart
index e52c56406a4af1b93bcee1d408d92879dfeeddc1..933954ff52502a5c97bf03f1eaf3ed23bf5c67fe 100644
--- a/runtime/observatory/lib/src/models/objects/function.dart
+++ b/runtime/observatory/lib/src/models/objects/function.dart
@@ -42,6 +42,22 @@ bool isStubFunction(FunctionKind kind) => kind == FunctionKind.stub;
bool hasDartCode(FunctionKind kind) =>
isDartFunction(kind) || isStubFunction(kind);
+String getFunctionFullName(FunctionRef function) {
+ var content = <String>[
+ function.name
+ ];
+ ObjectRef owner = function.dartOwner;
+ while (owner is FunctionRef) {
+ FunctionRef function = (owner as FunctionRef);
+ content.add(function.name);
+ owner = function.dartOwner;
+ }
+ if (owner is ClassRef) {
+ content.add(owner.name);
+ }
+ return content.reversed.join('.');
+}
+
abstract class FunctionRef extends ObjectRef {
/// The name of this class.
String get name;
« no previous file with comments | « runtime/observatory/lib/src/elements/function_ref.dart ('k') | runtime/observatory/lib/src/models/objects/sample_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698