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

Unified Diff: runtime/vm/profiler.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/vm/precompiler.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 53f04b66c0da5843abce84ed183d848c6b3b38e6..0d1ad844bc3b698fe986a23820e2c7a9577dc22e 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -26,12 +26,9 @@
namespace dart {
-
static const intptr_t kSampleSize = 8;
DECLARE_FLAG(bool, trace_profiler);
-
-DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler");
DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates.");
#if defined(TARGET_OS_ANDROID) || defined(TARGET_ARCH_ARM64) || \
@@ -52,6 +49,8 @@ DEFINE_FLAG(bool, profile_vm, false,
"Always collect native stack traces.");
#endif
+#ifndef PRODUCT
+
bool Profiler::initialized_ = false;
SampleBuffer* Profiler::sample_buffer_ = NULL;
@@ -61,7 +60,7 @@ void Profiler::InitOnce() {
SetSamplePeriod(FLAG_profile_period);
SetSampleDepth(FLAG_max_profile_depth);
Sample::InitOnce();
- if (!FLAG_profile) {
+ if (!FLAG_profiler) {
return;
}
ASSERT(!initialized_);
@@ -74,7 +73,7 @@ void Profiler::InitOnce() {
void Profiler::Shutdown() {
- if (!FLAG_profile) {
+ if (!FLAG_profiler) {
return;
}
ASSERT(initialized_);
@@ -1385,4 +1384,6 @@ ProcessedSampleBuffer::ProcessedSampleBuffer()
ASSERT(code_lookup_table_ != NULL);
}
+#endif // !PRODUCT
+
} // namespace dart
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698