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

Side by Side Diff: src/v8.cc

Issue 11574031: Intel VTune integration for V8/D8 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 27 matching lines...) Expand all
38 #include "hydrogen.h" 38 #include "hydrogen.h"
39 #include "lithium-allocator.h" 39 #include "lithium-allocator.h"
40 #include "log.h" 40 #include "log.h"
41 #include "objects.h" 41 #include "objects.h"
42 #include "once.h" 42 #include "once.h"
43 #include "platform.h" 43 #include "platform.h"
44 #include "runtime-profiler.h" 44 #include "runtime-profiler.h"
45 #include "serialize.h" 45 #include "serialize.h"
46 #include "store-buffer.h" 46 #include "store-buffer.h"
47 47
48 #ifdef ENABLE_VTUNE_JIT_INTERFACE
49 #include "third_party/vtune/vtune-jit.h"
50 #endif
51
48 namespace v8 { 52 namespace v8 {
49 namespace internal { 53 namespace internal {
50 54
51 V8_DECLARE_ONCE(init_once); 55 V8_DECLARE_ONCE(init_once);
52 56
53 bool V8::is_running_ = false; 57 bool V8::is_running_ = false;
54 bool V8::has_been_set_up_ = false; 58 bool V8::has_been_set_up_ = false;
55 bool V8::has_been_disposed_ = false; 59 bool V8::has_been_disposed_ = false;
56 bool V8::has_fatal_error_ = false; 60 bool V8::has_fatal_error_ = false;
57 bool V8::use_crankshaft_ = true; 61 bool V8::use_crankshaft_ = true;
(...skipping 17 matching lines...) Expand all
75 i::Isolate::EnterDefaultIsolate(); 79 i::Isolate::EnterDefaultIsolate();
76 } 80 }
77 81
78 ASSERT(i::Isolate::CurrentPerIsolateThreadData() != NULL); 82 ASSERT(i::Isolate::CurrentPerIsolateThreadData() != NULL);
79 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->thread_id().Equals( 83 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->thread_id().Equals(
80 i::ThreadId::Current())); 84 i::ThreadId::Current()));
81 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->isolate() == 85 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->isolate() ==
82 i::Isolate::Current()); 86 i::Isolate::Current());
83 87
84 if (IsDead()) return false; 88 if (IsDead()) return false;
85 89 #ifdef ENABLE_VTUNE_JIT_INTERFACE
90 if (i::FLAG_jit_profile)
danno 2012/12/20 16:34:38 My primary feedback about this patch is that the e
91 v8::V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, i::VTUNEJITInterfa ce::event_handler);
92 #endif
86 Isolate* isolate = Isolate::Current(); 93 Isolate* isolate = Isolate::Current();
87 if (isolate->IsInitialized()) return true; 94 if (isolate->IsInitialized()) return true;
88 95
89 is_running_ = true; 96 is_running_ = true;
90 has_been_set_up_ = true; 97 has_been_set_up_ = true;
91 has_fatal_error_ = false; 98 has_fatal_error_ = false;
92 has_been_disposed_ = false; 99 has_been_disposed_ = false;
93 100
94 return isolate->Init(des); 101 return isolate->Init(des);
95 } 102 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SetUpJSCallerSavedCodeData(); 299 SetUpJSCallerSavedCodeData();
293 SamplerRegistry::SetUp(); 300 SamplerRegistry::SetUp();
294 ExternalReference::SetUp(); 301 ExternalReference::SetUp();
295 } 302 }
296 303
297 void V8::InitializeOncePerProcess() { 304 void V8::InitializeOncePerProcess() {
298 CallOnce(&init_once, &InitializeOncePerProcessImpl); 305 CallOnce(&init_once, &InitializeOncePerProcessImpl);
299 } 306 }
300 307
301 } } // namespace v8::internal 308 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698