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

Unified Diff: tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2032903003: Switch how we track whether trackDdcProfile is set to reduce the performance impact. sra was seeing… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 | « lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/operations.dart
diff --git a/tool/input_sdk/private/ddc_runtime/operations.dart b/tool/input_sdk/private/ddc_runtime/operations.dart
index e7efe60f139931067ab1658c3dee33cd3d8b6152..3ae16308632c41ccf0786eb61ea7ae0fbba3f75c 100644
--- a/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -182,8 +182,11 @@ clearDynamicStats() {
_callMethodStats.clear();
}
+bool trackProfile = JS('bool', 'dart.global.trackDdcProfile');
+
_trackCall(obj, name) {
- if (JS('bool', '!dart.global.trackDdcProfile')) return;
+ if (JS('bool', '!#', trackProfile)) return;
+
var actual = getReifiedType(obj);
String stackStr = JS('String', "new Error().stack");
var stack = stackStr.split('\n at ');
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698