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

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

Issue 2707413002: Fix causal_async_star_stack_contents_test with optimization-counter-threshold=5 (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « no previous file | runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7a2780b30ecfe715d29b1a724a32cbb9ca63b55a..32a3548d30cba193d02626cb47b5aba4bf33c666 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -4404,6 +4404,14 @@ class ServiceMetric extends ServiceObject implements M.Metric {
String toString() => "ServiceMetric($_id)";
}
+void printFrames(List<Frame> frames) async {
+ for (int i = 0; i < frames.length; i++) {
+ final Frame frame = frames[i];
+ String frameText = await frame.toUserString();
+ print('#${i.toString().padLeft(3)}: $frameText');
+ }
+}
+
class Frame extends ServiceObject implements M.Frame {
M.FrameKind kind = M.FrameKind.regular;
int index;
@@ -4450,6 +4458,17 @@ class Frame extends ServiceObject implements M.Frame {
return "Frame([$kind])";
}
}
+
+ String toUserString() async {
+ if (function != null) {
+ return "Frame([$kind] ${function.qualifiedName} "
+ "${await location.toUserString()})";
+ } else if (location != null) {
+ return "Frame([$kind] ${await location.toUserString()}";
+ } else {
+ return "Frame([$kind])";
+ }
+ }
}
class ServiceMessage extends ServiceObject {
« no previous file with comments | « no previous file | runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698