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

Side by Side Diff: src/top.cc

Issue 6070009: Added labelled thread names to help with some debugging activity. Right now,... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-win32.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 clear_pending_message(); 163 clear_pending_message();
164 clear_scheduled_exception(); 164 clear_scheduled_exception();
165 } 165 }
166 166
167 167
168 // Create a dummy thread that will wait forever on a semaphore. The only 168 // Create a dummy thread that will wait forever on a semaphore. The only
169 // purpose for this thread is to have some stack area to save essential data 169 // purpose for this thread is to have some stack area to save essential data
170 // into for use by a stacks only core dump (aka minidump). 170 // into for use by a stacks only core dump (aka minidump).
171 class PreallocatedMemoryThread: public Thread { 171 class PreallocatedMemoryThread: public Thread {
172 public: 172 public:
173 PreallocatedMemoryThread() : keep_running_(true) { 173 PreallocatedMemoryThread()
174 : Thread("v8:PreallocMem"),
175 keep_running_(true) {
174 wait_for_ever_semaphore_ = OS::CreateSemaphore(0); 176 wait_for_ever_semaphore_ = OS::CreateSemaphore(0);
175 data_ready_semaphore_ = OS::CreateSemaphore(0); 177 data_ready_semaphore_ = OS::CreateSemaphore(0);
176 } 178 }
177 179
178 // When the thread starts running it will allocate a fixed number of bytes 180 // When the thread starts running it will allocate a fixed number of bytes
179 // on the stack and publish the location of this memory for others to use. 181 // on the stack and publish the location of this memory for others to use.
180 void Run() { 182 void Run() {
181 EmbeddedVector<char, 15 * 1024> local_buffer; 183 EmbeddedVector<char, 15 * 1024> local_buffer;
182 184
183 // Initialize the buffer with a known good value. 185 // Initialize the buffer with a known good value.
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 #ifdef V8_TARGET_ARCH_ARM 1097 #ifdef V8_TARGET_ARCH_ARM
1096 thread_local_.simulator_ = assembler::arm::Simulator::current(); 1098 thread_local_.simulator_ = assembler::arm::Simulator::current();
1097 #elif V8_TARGET_ARCH_MIPS 1099 #elif V8_TARGET_ARCH_MIPS
1098 thread_local_.simulator_ = assembler::mips::Simulator::current(); 1100 thread_local_.simulator_ = assembler::mips::Simulator::current();
1099 #endif 1101 #endif
1100 #endif 1102 #endif
1101 return from + sizeof(thread_local_); 1103 return from + sizeof(thread_local_);
1102 } 1104 }
1103 1105
1104 } } // namespace v8::internal 1106 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698