diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-08 01:55:07 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-08 01:55:07 +0000 |
commit | 92fe610ca9b3a745c00f5d172fa8d955004fcecc (patch) | |
tree | d12d523dbd564090fbfb3d51ca59700bb156d007 /content | |
parent | 54947031f1b6094498f16b49009a5abceba3d401 (diff) | |
download | chromium_src-92fe610ca9b3a745c00f5d172fa8d955004fcecc.zip chromium_src-92fe610ca9b3a745c00f5d172fa8d955004fcecc.tar.gz chromium_src-92fe610ca9b3a745c00f5d172fa8d955004fcecc.tar.bz2 |
Add tracing support to NaCl
Add Ppapi IPC messages and a handler inside of the NaCl IRT to enable, disable, and send the result of tracing.
BUG=93839
Review URL: https://codereview.chromium.org/11411118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/DEPS | 1 | ||||
-rw-r--r-- | content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc | 2 | ||||
-rw-r--r-- | content/browser/trace_message_filter.cc | 25 | ||||
-rw-r--r-- | content/common/DEPS | 1 | ||||
-rw-r--r-- | content/common/child_process_messages.h | 38 | ||||
-rw-r--r-- | content/common/child_thread.cc | 5 | ||||
-rw-r--r-- | content/components/tracing/DEPS | 9 | ||||
-rw-r--r-- | content/components/tracing/OWNERS | 2 | ||||
-rw-r--r-- | content/components/tracing/child_trace_message_filter.cc (renamed from content/common/child_trace_message_filter.cc) | 54 | ||||
-rw-r--r-- | content/components/tracing/child_trace_message_filter.h (renamed from content/common/child_trace_message_filter.h) | 22 | ||||
-rw-r--r-- | content/components/tracing/tracing_messages.cc | 34 | ||||
-rw-r--r-- | content/components/tracing/tracing_messages.h | 56 | ||||
-rw-r--r-- | content/content_common.gypi | 3 | ||||
-rw-r--r-- | content/content_components_tracing.gyp | 27 | ||||
-rw-r--r-- | content/content_components_tracing_untrusted.gyp | 41 |
15 files changed, 233 insertions, 87 deletions
diff --git a/content/browser/DEPS b/content/browser/DEPS index 32bbc89..8a06869 100644 --- a/content/browser/DEPS +++ b/content/browser/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+content/components/tracing", "+content/gpu", # For gpu_info_collector.h and in-process GPU "+content/port/browser", "+content/public/browser", diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc index 4dcb18d..2b79f3b 100644 --- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc +++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc @@ -5,6 +5,7 @@ #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" #include "content/browser/renderer_host/pepper/pepper_message_filter.h" +#include "content/browser/trace_message_filter.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_view_host.h" #include "ipc/ipc_message_macros.h" @@ -37,6 +38,7 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess( render_process_id, render_view_id)); channel->AddFilter(browser_ppapi_host->message_filter()); + channel->AddFilter(new TraceMessageFilter()); return browser_ppapi_host; } diff --git a/content/browser/trace_message_filter.cc b/content/browser/trace_message_filter.cc index 65bc842..a2586a1 100644 --- a/content/browser/trace_message_filter.cc +++ b/content/browser/trace_message_filter.cc @@ -5,7 +5,7 @@ #include "content/browser/trace_message_filter.h" #include "content/browser/trace_controller_impl.h" -#include "content/common/child_process_messages.h" +#include "content/components/tracing/tracing_messages.h" namespace content { @@ -40,14 +40,14 @@ bool TraceMessageFilter::OnMessageReceived(const IPC::Message& message, // Always on IO thread (BrowserMessageFilter guarantee). bool handled = true; IPC_BEGIN_MESSAGE_MAP_EX(TraceMessageFilter, message, *message_was_ok) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ChildSupportsTracing, + IPC_MESSAGE_HANDLER(TracingHostMsg_ChildSupportsTracing, OnChildSupportsTracing) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_EndTracingAck, OnEndTracingAck) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceDataCollected, + IPC_MESSAGE_HANDLER(TracingHostMsg_EndTracingAck, OnEndTracingAck) + IPC_MESSAGE_HANDLER(TracingHostMsg_TraceDataCollected, OnTraceDataCollected) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceNotification, + IPC_MESSAGE_HANDLER(TracingHostMsg_TraceNotification, OnTraceNotification) - IPC_MESSAGE_HANDLER(ChildProcessHostMsg_TraceBufferPercentFullReply, + IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply, OnTraceBufferPercentFullReply) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP_EX() @@ -58,31 +58,32 @@ void TraceMessageFilter::SendBeginTracing( const std::vector<std::string>& included_categories, const std::vector<std::string>& excluded_categories) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - Send(new ChildProcessMsg_BeginTracing(included_categories, - excluded_categories)); + Send(new TracingMsg_BeginTracing(included_categories, + excluded_categories, + base::TimeTicks::NowFromSystemTraceTime())); } void TraceMessageFilter::SendEndTracing() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!is_awaiting_end_ack_); is_awaiting_end_ack_ = true; - Send(new ChildProcessMsg_EndTracing); + Send(new TracingMsg_EndTracing); } void TraceMessageFilter::SendGetTraceBufferPercentFull() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!is_awaiting_buffer_percent_full_ack_); is_awaiting_buffer_percent_full_ack_ = true; - Send(new ChildProcessMsg_GetTraceBufferPercentFull); + Send(new TracingMsg_GetTraceBufferPercentFull); } void TraceMessageFilter::SendSetWatchEvent(const std::string& category_name, const std::string& event_name) { - Send(new ChildProcessMsg_SetWatchEvent(category_name, event_name)); + Send(new TracingMsg_SetWatchEvent(category_name, event_name)); } void TraceMessageFilter::SendCancelWatchEvent() { - Send(new ChildProcessMsg_CancelWatchEvent); + Send(new TracingMsg_CancelWatchEvent); } TraceMessageFilter::~TraceMessageFilter() {} diff --git a/content/common/DEPS b/content/common/DEPS index 2d409fc..3a97cab 100644 --- a/content/common/DEPS +++ b/content/common/DEPS @@ -2,4 +2,5 @@ include_rules = [ "+cc", "+media/base", "+sandbox/linux/seccomp-legacy", + "+content/components/tracing", ] diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h index 93c5578..0cf2a3a 100644 --- a/content/common/child_process_messages.h +++ b/content/common/child_process_messages.h @@ -72,25 +72,6 @@ IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIPCLoggingEnabled, bool /* on or off */) #endif -// Sent to all child processes to enable trace event recording. -IPC_MESSAGE_CONTROL2(ChildProcessMsg_BeginTracing, - std::vector<std::string> /* included_categories */, - std::vector<std::string> /* excluded_categories */) - -// Sent to all child processes to disable trace event recording. -IPC_MESSAGE_CONTROL0(ChildProcessMsg_EndTracing) - -// Sent to all child processes to get trace buffer fullness. -IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) - -// Sent to all child processes to set watch event. -IPC_MESSAGE_CONTROL2(ChildProcessMsg_SetWatchEvent, - std::string /* category_name */, - std::string /* event_name */) - -// Sent to all child processes to clear watch event. -IPC_MESSAGE_CONTROL0(ChildProcessMsg_CancelWatchEvent) - // Tell the child process to enable or disable the profiler status. IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus, tracked_objects::ThreadData::Status /* profiler status */) @@ -117,25 +98,6 @@ IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTcmallocStats) IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) -// Notify the browser that this child process supports tracing. -IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ChildSupportsTracing) - -// Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). -IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_EndTracingAck, - std::vector<std::string> /* known_categories */) - -// Sent if the trace buffer becomes full. -IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceNotification, - int /* base::debug::TraceLog::Notification */) - -// Child processes send trace data back in JSON chunks. -IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceDataCollected, - std::string /*json trace data*/) - -// Reply to ChildProcessMsg_GetTraceBufferPercentFull. -IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, - float /*trace buffer percent full*/) - // Send back profiler data (ThreadData in tracked_objects). IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData, int, /* sequence_number */ diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc index 17e201d..8b1b000 100644 --- a/content/common/child_thread.cc +++ b/content/common/child_thread.cc @@ -14,11 +14,11 @@ #include "content/common/child_histogram_message_filter.h" #include "content/common/child_process.h" #include "content/common/child_process_messages.h" -#include "content/common/child_trace_message_filter.h" #include "content/common/fileapi/file_system_dispatcher.h" #include "content/common/quota_dispatcher.h" #include "content/common/resource_dispatcher.h" #include "content/common/socket_stream_dispatcher.h" +#include "content/components/tracing/child_trace_message_filter.h" #include "content/public/common/content_switches.h" #include "ipc/ipc_logging.h" #include "ipc/ipc_switches.h" @@ -115,7 +115,8 @@ void ChildThread::Init() { channel_->AddFilter(histogram_message_filter_.get()); channel_->AddFilter(sync_message_filter_.get()); - channel_->AddFilter(new ChildTraceMessageFilter()); + channel_->AddFilter(new ChildTraceMessageFilter( + ChildProcess::current()->io_message_loop_proxy())); #if defined(OS_POSIX) // Check that --process-type is specified so we don't do this in unit tests diff --git a/content/components/tracing/DEPS b/content/components/tracing/DEPS new file mode 100644 index 0000000..7330946 --- /dev/null +++ b/content/components/tracing/DEPS @@ -0,0 +1,9 @@ +include_rules = [ + "+base", + "+ipc", + + # This component will be compiled into NaCl, so it shouldn't depend on + # anything else in content. + "-content", + "+content/components/tracing", +] diff --git a/content/components/tracing/OWNERS b/content/components/tracing/OWNERS new file mode 100644 index 0000000..ba7dc1b --- /dev/null +++ b/content/components/tracing/OWNERS @@ -0,0 +1,2 @@ +jbauman@chromium.org +nduca@chromium.org diff --git a/content/common/child_trace_message_filter.cc b/content/components/tracing/child_trace_message_filter.cc index d3f4341..453a976 100644 --- a/content/common/child_trace_message_filter.cc +++ b/content/components/tracing/child_trace_message_filter.cc @@ -2,25 +2,26 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/common/child_trace_message_filter.h" +#include "content/components/tracing/child_trace_message_filter.h" -#include "base/bind.h" #include "base/debug/trace_event.h" -#include "base/message_loop.h" -#include "content/common/child_process.h" -#include "content/common/child_process_messages.h" +#include "base/message_loop_proxy.h" +#include "content/components/tracing/tracing_messages.h" using base::debug::TraceLog; namespace content { -ChildTraceMessageFilter::ChildTraceMessageFilter() : channel_(NULL) {} +ChildTraceMessageFilter::ChildTraceMessageFilter( + base::MessageLoopProxy* ipc_message_loop) + : channel_(NULL), + ipc_message_loop_(ipc_message_loop) {} void ChildTraceMessageFilter::OnFilterAdded(IPC::Channel* channel) { channel_ = channel; TraceLog::GetInstance()->SetNotificationCallback( base::Bind(&ChildTraceMessageFilter::OnTraceNotification, this)); - channel_->Send(new ChildProcessHostMsg_ChildSupportsTracing()); + channel_->Send(new TracingHostMsg_ChildSupportsTracing()); } void ChildTraceMessageFilter::OnFilterRemoved() { @@ -31,12 +32,12 @@ void ChildTraceMessageFilter::OnFilterRemoved() { bool ChildTraceMessageFilter::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(ChildTraceMessageFilter, message) - IPC_MESSAGE_HANDLER(ChildProcessMsg_BeginTracing, OnBeginTracing) - IPC_MESSAGE_HANDLER(ChildProcessMsg_EndTracing, OnEndTracing) - IPC_MESSAGE_HANDLER(ChildProcessMsg_GetTraceBufferPercentFull, + IPC_MESSAGE_HANDLER(TracingMsg_BeginTracing, OnBeginTracing) + IPC_MESSAGE_HANDLER(TracingMsg_EndTracing, OnEndTracing) + IPC_MESSAGE_HANDLER(TracingMsg_GetTraceBufferPercentFull, OnGetTraceBufferPercentFull) - IPC_MESSAGE_HANDLER(ChildProcessMsg_SetWatchEvent, OnSetWatchEvent) - IPC_MESSAGE_HANDLER(ChildProcessMsg_CancelWatchEvent, OnCancelWatchEvent) + IPC_MESSAGE_HANDLER(TracingMsg_SetWatchEvent, OnSetWatchEvent) + IPC_MESSAGE_HANDLER(TracingMsg_CancelWatchEvent, OnCancelWatchEvent) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -46,7 +47,16 @@ ChildTraceMessageFilter::~ChildTraceMessageFilter() {} void ChildTraceMessageFilter::OnBeginTracing( const std::vector<std::string>& included_categories, - const std::vector<std::string>& excluded_categories) { + const std::vector<std::string>& excluded_categories, + base::TimeTicks browser_time) { +#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 + // latency. + base::TimeDelta time_offset = base::TimeTicks::NowFromSystemTraceTime() - + browser_time; + TraceLog::GetInstance()->SetTimeOffset(time_offset); +#endif TraceLog::GetInstance()->SetEnabled(included_categories, excluded_categories); } @@ -63,13 +73,13 @@ void ChildTraceMessageFilter::OnEndTracing() { std::vector<std::string> categories; TraceLog::GetInstance()->GetKnownCategories(&categories); - channel_->Send(new ChildProcessHostMsg_EndTracingAck(categories)); + channel_->Send(new TracingHostMsg_EndTracingAck(categories)); } void ChildTraceMessageFilter::OnGetTraceBufferPercentFull() { float bpf = TraceLog::GetInstance()->GetBufferPercentFull(); - channel_->Send(new ChildProcessHostMsg_TraceBufferPercentFullReply(bpf)); + channel_->Send(new TracingHostMsg_TraceBufferPercentFullReply(bpf)); } void ChildTraceMessageFilter::OnSetWatchEvent(const std::string& category_name, @@ -84,26 +94,24 @@ void ChildTraceMessageFilter::OnCancelWatchEvent() { void ChildTraceMessageFilter::OnTraceDataCollected( const scoped_refptr<base::RefCountedString>& events_str_ptr) { - if (MessageLoop::current() != ChildProcess::current()->io_message_loop()) { - ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE, + if (!ipc_message_loop_->BelongsToCurrentThread()) { + ipc_message_loop_->PostTask(FROM_HERE, base::Bind(&ChildTraceMessageFilter::OnTraceDataCollected, this, events_str_ptr)); return; } - - channel_->Send(new ChildProcessHostMsg_TraceDataCollected( + channel_->Send(new TracingHostMsg_TraceDataCollected( events_str_ptr->data())); } void ChildTraceMessageFilter::OnTraceNotification(int notification) { - if (MessageLoop::current() != ChildProcess::current()->io_message_loop()) { - ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE, + if (!ipc_message_loop_->BelongsToCurrentThread()) { + ipc_message_loop_->PostTask(FROM_HERE, base::Bind(&ChildTraceMessageFilter::OnTraceNotification, this, notification)); return; } - - channel_->Send(new ChildProcessHostMsg_TraceNotification(notification)); + channel_->Send(new TracingHostMsg_TraceNotification(notification)); } } // namespace content diff --git a/content/common/child_trace_message_filter.h b/content/components/tracing/child_trace_message_filter.h index 061a6eb..c6a72e2 100644 --- a/content/common/child_trace_message_filter.h +++ b/content/components/tracing/child_trace_message_filter.h @@ -2,21 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_ -#define CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_ +#ifndef CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ +#define CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ -#include <string> - -#include "base/debug/trace_event.h" -#include "base/process.h" #include "ipc/ipc_channel_proxy.h" +namespace base { +class MessageLoopProxy; +} + namespace content { // This class sends and receives trace messages on child processes. class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter { public: - ChildTraceMessageFilter(); + explicit ChildTraceMessageFilter(base::MessageLoopProxy* ipc_message_loop); // IPC::ChannelProxy::MessageFilter implementation. virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; @@ -29,7 +29,8 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter { private: // Message handlers. void OnBeginTracing(const std::vector<std::string>& included_categories, - const std::vector<std::string>& excluded_categories); + const std::vector<std::string>& excluded_categories, + base::TimeTicks browser_time); void OnEndTracing(); void OnGetTraceBufferPercentFull(); void OnSetWatchEvent(const std::string& category_name, @@ -42,10 +43,11 @@ class ChildTraceMessageFilter : public IPC::ChannelProxy::MessageFilter { void OnTraceNotification(int notification); IPC::Channel* channel_; + base::MessageLoopProxy* ipc_message_loop_; DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); }; -} // namespace content +} // namespace content -#endif // CONTENT_COMMON_CHILD_TRACE_MESSAGE_FILTER_H_ +#endif // CONTENT_COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ diff --git a/content/components/tracing/tracing_messages.cc b/content/components/tracing/tracing_messages.cc new file mode 100644 index 0000000..df41fad --- /dev/null +++ b/content/components/tracing/tracing_messages.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Get basic type definitions. +#define IPC_MESSAGE_IMPL +#include "content/components/tracing/tracing_messages.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "content/components/tracing/tracing_messages.h" + +// Generate destructors. +#include "ipc/struct_destructor_macros.h" +#include "content/components/tracing/tracing_messages.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC { +#include "content/components/tracing/tracing_messages.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC { +#include "content/components/tracing/tracing_messages.h" +} // namespace IPC + +// Generate param traits log methods. +#include "ipc/param_traits_log_macros.h" +namespace IPC { +#include "content/components/tracing/tracing_messages.h" +} // namespace IPC + diff --git a/content/components/tracing/tracing_messages.h b/content/components/tracing/tracing_messages.h new file mode 100644 index 0000000..792c476 --- /dev/null +++ b/content/components/tracing/tracing_messages.h @@ -0,0 +1,56 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Multiply-included message header, no traditional include guard. +#include <string> +#include <vector> + +#include "base/basictypes.h" +#include "base/sync_socket.h" +#include "ipc/ipc_channel_handle.h" +#include "ipc/ipc_message_macros.h" +#include "ipc/ipc_message_utils.h" +#include "ipc/ipc_platform_file.h" + +#define IPC_MESSAGE_START TracingMsgStart + +// Sent to all child processes to enable trace event recording. +IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing, + std::vector<std::string> /* included_categories */, + std::vector<std::string> /* excluded_categories */, + base::TimeTicks /* browser_time */) + +// Sent to all child processes to disable trace event recording. +IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing) + +// Sent to all child processes to get trace buffer fullness. +IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceBufferPercentFull) + +// Sent to all child processes to set watch event. +IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent, + std::string /* category_name */, + std::string /* event_name */) + +// Sent to all child processes to clear watch event. +IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent) + +// Notify the browser that this child process supports tracing. +IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing) + +// Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). +IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck, + std::vector<std::string> /* known_categories */) + +// Sent if the trace buffer becomes full. +IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceNotification, + int /* base::debug::TraceLog::Notification */) + +// Child processes send trace data back in JSON chunks. +IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected, + std::string /*json trace data*/) + +// Reply to TracingMsg_GetTraceBufferPercentFull. +IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceBufferPercentFullReply, + float /*trace buffer percent full*/) + diff --git a/content/content_common.gypi b/content/content_common.gypi index 3a7f550..3f74f0b 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -12,6 +12,7 @@ '../third_party/icu/icu.gyp:icuuc', '../ui/ui.gyp:ui', '../webkit/support/webkit_support.gyp:user_agent', + 'content_components_tracing.gyp:tracing', ], 'include_dirs': [ '..', @@ -140,8 +141,6 @@ 'common/child_process_sandbox_support_impl_shm_linux.cc', 'common/child_thread.cc', 'common/child_thread.h', - 'common/child_trace_message_filter.cc', - 'common/child_trace_message_filter.h', 'common/clipboard_messages.cc', 'common/clipboard_messages.h', 'common/content_constants_internal.cc', diff --git a/content/content_components_tracing.gyp b/content/content_components_tracing.gyp new file mode 100644 index 0000000..c9537b1 --- /dev/null +++ b/content/content_components_tracing.gyp @@ -0,0 +1,27 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets' : [ + { + 'target_name': 'tracing', + 'type': 'static_library', + 'defines!': ['CONTENT_IMPLEMENTATION'], + 'dependencies': [ + '../base/base.gyp:base', + '../ipc/ipc.gyp:ipc', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'components/tracing/child_trace_message_filter.cc', + 'components/tracing/child_trace_message_filter.h', + 'components/tracing/tracing_messages.cc', + 'components/tracing/tracing_messages.h', + ], + }, + ], +} diff --git a/content/content_components_tracing_untrusted.gyp b/content/content_components_tracing_untrusted.gyp new file mode 100644 index 0000000..701d9f3 --- /dev/null +++ b/content/content_components_tracing_untrusted.gyp @@ -0,0 +1,41 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'includes': [ + '../build/common_untrusted.gypi', + ], + 'conditions': [ + ['disable_nacl==0 and disable_nacl_untrusted==0', { + 'targets': [ + { + 'target_name': 'tracing_untrusted', + 'type': 'none', + 'defines!': ['CONTENT_IMPLEMENTATION'], + 'dependencies': [ + '../base/base_untrusted.gyp:base_untrusted', + '../native_client/tools.gyp:prep_toolchain', + '../ipc/ipc.gyp:ipc', + ], + 'include_dirs': [ + '..', + ], + 'variables': { + 'nacl_untrusted_build': 1, + 'nlib_target': 'libtracing_untrusted.a', + 'build_glibc': 0, + 'build_newlib': 1, + }, + 'sources': [ + 'components/tracing/child_trace_message_filter.cc', + 'components/tracing/child_trace_message_filter.h', + 'components/tracing/tracing_messages.cc', + 'components/tracing/tracing_messages.h', + ], + }, + ], + }], + ], +} |