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

Unified Diff: src/v8threads.h

Issue 48009: Add thread information to the debugger (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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
« src/runtime.cc ('K') | « src/runtime.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8threads.h
===================================================================
--- src/v8threads.h (revision 1518)
+++ src/v8threads.h (working copy)
@@ -45,6 +45,10 @@
static ThreadState* GetFree();
+ // Id of thread.
+ void set_id(int id) { id_ = id; }
+ int id() { return id_; }
+
// Get data area for archiving a thread.
char* data() { return data_; }
private:
@@ -52,9 +56,11 @@
void AllocateSpace();
+ int id_;
char* data_;
ThreadState* next_;
ThreadState* previous_;
+
// In the following two lists there is always at least one object on the list.
// The first object is a flying anchor that is only there to simplify linking
// and unlinking.
@@ -77,9 +83,15 @@
static void MarkCompactPrologue(bool is_compacting);
static void MarkCompactEpilogue(bool is_compacting);
static bool IsLockedByCurrentThread() { return mutex_owner_.IsSelf(); }
+
+ static int CurrentId();
+ static void AssignId();
+
+ static const int kInvalidId = -1;
private:
static void EagerlyArchiveThread();
+ static int next_id_; // V8 threads are identified through an integer.
static Mutex* mutex_;
static ThreadHandle mutex_owner_;
static ThreadHandle lazily_archived_thread_;
« src/runtime.cc ('K') | « src/runtime.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698