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

Side by Side Diff: src/log.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 10 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 IncrementStateCounter(state); 269 IncrementStateCounter(state);
270 ASSERT(IsPowerOf2(kBufferSize)); 270 ASSERT(IsPowerOf2(kBufferSize));
271 current_index_ = (current_index_ + 1) & (kBufferSize - 1); 271 current_index_ = (current_index_ + 1) & (kBufferSize - 1);
272 } 272 }
273 273
274 274
275 // 275 //
276 // Profiler implementation. 276 // Profiler implementation.
277 // 277 //
278 Profiler::Profiler() 278 Profiler::Profiler()
279 : head_(0), 279 :
280 #ifdef DEBUG_THREAD_NAMES
281 Thread("v8:Profiler"),
282 #endif
283 head_(0),
280 tail_(0), 284 tail_(0),
281 overflow_(false), 285 overflow_(false),
282 buffer_semaphore_(OS::CreateSemaphore(0)), 286 buffer_semaphore_(OS::CreateSemaphore(0)),
283 engaged_(false), 287 engaged_(false),
284 running_(false) { 288 running_(false) {
285 } 289 }
286 290
287 291
288 void Profiler::Engage() { 292 void Profiler::Engage() {
289 if (engaged_) return; 293 if (engaged_) return;
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 } 1631 }
1628 // Otherwise, if the sliding state window computation has not been 1632 // Otherwise, if the sliding state window computation has not been
1629 // started we do it now. 1633 // started we do it now.
1630 if (sliding_state_window_ == NULL) { 1634 if (sliding_state_window_ == NULL) {
1631 sliding_state_window_ = new SlidingStateWindow(); 1635 sliding_state_window_ = new SlidingStateWindow();
1632 } 1636 }
1633 #endif 1637 #endif
1634 } 1638 }
1635 1639
1636 } } // namespace v8::internal 1640 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698