| Index: chrome/common/profiling.cc
|
| diff --git a/chrome/common/profiling.cc b/chrome/common/profiling.cc
|
| index 40055183eba0bf18e07f8c0833fb59dcd3fddeca..c8016dcc1026495030077ef718105b86cef81686 100644
|
| --- a/chrome/common/profiling.cc
|
| +++ b/chrome/common/profiling.cc
|
| @@ -17,35 +17,9 @@
|
| #include "base/threading/thread.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "content/public/common/content_switches.h"
|
| -#include "gin/public/debug.h"
|
| -#include "v8/include/v8.h"
|
|
|
| namespace {
|
|
|
| -base::debug::AddDynamicSymbol add_dynamic_symbol_func = NULL;
|
| -base::debug::MoveDynamicSymbol move_dynamic_symbol_func = NULL;
|
| -
|
| -void JitCodeEventHandler(const v8::JitCodeEvent* event) {
|
| - DCHECK_NE(static_cast<base::debug::AddDynamicSymbol>(NULL),
|
| - add_dynamic_symbol_func);
|
| - DCHECK_NE(static_cast<base::debug::MoveDynamicSymbol>(NULL),
|
| - move_dynamic_symbol_func);
|
| -
|
| - switch (event->type) {
|
| - case v8::JitCodeEvent::CODE_ADDED:
|
| - add_dynamic_symbol_func(event->code_start, event->code_len,
|
| - event->name.str, event->name.len);
|
| - break;
|
| -
|
| - case v8::JitCodeEvent::CODE_MOVED:
|
| - move_dynamic_symbol_func(event->code_start, event->new_code_start);
|
| - break;
|
| -
|
| - default:
|
| - break;
|
| - }
|
| -}
|
| -
|
| std::string GetProfileName() {
|
| static const char kDefaultProfileName[] = "chrome-profile-{type}-{pid}";
|
| CR_DEFINE_STATIC_LOCAL(std::string, profile_name, ());
|
| @@ -135,32 +109,6 @@ void Profiling::ProcessStarted() {
|
| std::string process_type =
|
| command_line.GetSwitchValueASCII(switches::kProcessType);
|
|
|
| - // Establish the V8 profiling hooks if we're an instrumented binary.
|
| - if (base::debug::IsBinaryInstrumented()) {
|
| - base::debug::ReturnAddressLocationResolver resolve_func =
|
| - base::debug::GetProfilerReturnAddrResolutionFunc();
|
| -
|
| - if (resolve_func != NULL) {
|
| - v8::V8::SetReturnAddressLocationResolver(resolve_func);
|
| - }
|
| -
|
| - // Set up the JIT code entry handler and the symbol callbacks if the
|
| - // profiler supplies them.
|
| - // TODO(siggi): Maybe add a switch or an environment variable to turn off
|
| - // V8 profiling?
|
| - base::debug::DynamicFunctionEntryHook entry_hook_func =
|
| - base::debug::GetProfilerDynamicFunctionEntryHookFunc();
|
| - add_dynamic_symbol_func = base::debug::GetProfilerAddDynamicSymbolFunc();
|
| - move_dynamic_symbol_func = base::debug::GetProfilerMoveDynamicSymbolFunc();
|
| -
|
| - if (entry_hook_func != NULL &&
|
| - add_dynamic_symbol_func != NULL &&
|
| - move_dynamic_symbol_func != NULL) {
|
| - gin::Debug::SetFunctionEntryHook(entry_hook_func);
|
| - gin::Debug::SetJitCodeEventHandler(&JitCodeEventHandler);
|
| - }
|
| - }
|
| -
|
| if (command_line.HasSwitch(switches::kProfilingAtStart)) {
|
| std::string process_type_to_start =
|
| command_line.GetSwitchValueASCII(switches::kProfilingAtStart);
|
|
|