summaryrefslogtreecommitdiffstats
path: root/components/tracing
diff options
context:
space:
mode:
authordsinclair@chromium.org <dsinclair@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-23 02:09:53 +0000
committerdsinclair@chromium.org <dsinclair@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-23 02:09:53 +0000
commitdcc7837317b2f78398461ae1cc78e14780222639 (patch)
tree837804f3c4ec78738648199193dd9948498bfa25 /components/tracing
parent9b5f0a4b60e2139bb6e80947f93f59164bb1ee17 (diff)
downloadchromium_src-dcc7837317b2f78398461ae1cc78e14780222639.zip
chromium_src-dcc7837317b2f78398461ae1cc78e14780222639.tar.gz
chromium_src-dcc7837317b2f78398461ae1cc78e14780222639.tar.bz2
Add a mode flag to the tracing framework.
The mode is provided when SetEnabled is called. Currently there is only one mode which is the trace until buffer is full mode. We will be adding a continuous tracing mode which this will support. BUG=156025 Review URL: https://chromiumcodereview.appspot.com/12302036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/tracing')
-rw-r--r--components/tracing/child_trace_message_filter.cc9
-rw-r--r--components/tracing/child_trace_message_filter.h3
-rw-r--r--components/tracing/tracing_messages.h5
3 files changed, 11 insertions, 6 deletions
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 161c778..1b001a7 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -48,7 +48,8 @@ ChildTraceMessageFilter::~ChildTraceMessageFilter() {}
void ChildTraceMessageFilter::OnBeginTracing(
const std::vector<std::string>& included_categories,
const std::vector<std::string>& excluded_categories,
- base::TimeTicks browser_time) {
+ base::TimeTicks browser_time,
+ int options) {
#if defined(__native_client__)
// NaCl and system times are offset by a bit, so subtract some time from
// the captured timestamps. The value might be off by a bit due to messaging
@@ -57,8 +58,10 @@ void ChildTraceMessageFilter::OnBeginTracing(
browser_time;
TraceLog::GetInstance()->SetTimeOffset(time_offset);
#endif
- TraceLog::GetInstance()->SetEnabled(included_categories,
- excluded_categories);
+ TraceLog::GetInstance()->SetEnabled(
+ included_categories,
+ excluded_categories,
+ static_cast<base::debug::TraceLog::Options>(options));
}
void ChildTraceMessageFilter::OnEndTracing() {
diff --git a/components/tracing/child_trace_message_filter.h b/components/tracing/child_trace_message_filter.h
index e4802ba..7d85627 100644
--- a/components/tracing/child_trace_message_filter.h
+++ b/components/tracing/child_trace_message_filter.h
@@ -30,7 +30,8 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter {
// Message handlers.
void OnBeginTracing(const std::vector<std::string>& included_categories,
const std::vector<std::string>& excluded_categories,
- base::TimeTicks browser_time);
+ base::TimeTicks browser_time,
+ int mode);
void OnEndTracing();
void OnGetTraceBufferPercentFull();
void OnSetWatchEvent(const std::string& category_name,
diff --git a/components/tracing/tracing_messages.h b/components/tracing/tracing_messages.h
index 792c476..fd15c21 100644
--- a/components/tracing/tracing_messages.h
+++ b/components/tracing/tracing_messages.h
@@ -16,10 +16,11 @@
#define IPC_MESSAGE_START TracingMsgStart
// Sent to all child processes to enable trace event recording.
-IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing,
+IPC_MESSAGE_CONTROL4(TracingMsg_BeginTracing,
std::vector<std::string> /* included_categories */,
std::vector<std::string> /* excluded_categories */,
- base::TimeTicks /* browser_time */)
+ base::TimeTicks /* browser_time */,
+ int /* base::debug::TraceLog::Options */)
// Sent to all child processes to disable trace event recording.
IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing)