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

Unified Diff: src/isolate.cc

Issue 12450003: Separate output files for --trace-hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some simplifications Created 7 years, 10 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 | « src/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 4970ec760871b793f71b5d8d3bd4dcfa086bd9c1..d6f84b70f6226c372cbd1e0d6aea027925a0df7f 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -338,7 +338,7 @@ Thread::LocalStorageKey Isolate::thread_id_key_;
Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_;
Mutex* Isolate::process_wide_mutex_ = OS::CreateMutex();
Isolate::ThreadDataTable* Isolate::thread_data_table_ = NULL;
-
+Atomic32 Isolate::isolate_counter_ = 0;
Isolate::PerIsolateThreadData* Isolate::AllocatePerIsolateThreadData(
ThreadId thread_id) {
@@ -1624,7 +1624,8 @@ void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) {
#define TRACE_ISOLATE(tag) \
do { \
if (FLAG_trace_isolates) { \
- PrintF("Isolate %p " #tag "\n", reinterpret_cast<void*>(this)); \
+ PrintF("Isolate %p (id %d)" #tag "\n", \
+ reinterpret_cast<void*>(this), id()); \
} \
} while (false)
#else
@@ -1684,6 +1685,7 @@ Isolate::Isolate()
optimizing_compiler_thread_(this),
marking_thread_(NULL),
sweeper_thread_(NULL) {
+ id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
TRACE_ISOLATE(constructor);
memset(isolate_addresses_, 0,
@@ -2311,6 +2313,12 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) {
}
+HTracer* Isolate::GetHTracer() {
+ if (htracer() == NULL) set_htracer(new HTracer(id()));
+ return htracer();
+}
+
+
CodeStubInterfaceDescriptor*
Isolate::code_stub_interface_descriptor(int index) {
return code_stub_interface_descriptors_ + index;
« no previous file with comments | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698