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

Unified Diff: base/debug/trace_event_impl.cc

Issue 17176024: Add option to enable sampler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index ae4fb1e129390e31552786c533fefcc94a7cdea2..0885cab65c7a62943e6ef00795334415e659db39 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -89,6 +89,7 @@ LazyInstance<ThreadLocalPointer<const char> >::Leaky
const char kRecordUntilFull[] = "record-until-full";
const char kRecordContinuously[] = "record-continuously";
+const char kEnableSampling[] = "enable-sampling";
size_t NextIndex(size_t index) {
index++;
@@ -761,6 +762,8 @@ TraceLog::Options TraceLog::TraceOptionsFromString(const std::string& options) {
ret |= RECORD_UNTIL_FULL;
} else if (*iter == kRecordContinuously) {
ret |= RECORD_CONTINUOUSLY;
+ } else if (*iter == kEnableSampling) {
+ ret |= ENABLE_SAMPLING;
} else {
NOTREACHED(); // Unknown option provided.
}
« no previous file with comments | « no previous file | base/debug/trace_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698