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

Side by Side Diff: src/log.h

Issue 9976003: Minimize uses of lazy initialization by adding explicit initialization functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Daniel's comments. Created 8 years, 8 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/lazy-instance.h ('k') | src/log.cc » ('j') | src/v8.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 // Process wide registry of samplers. 431 // Process wide registry of samplers.
432 class SamplerRegistry : public AllStatic { 432 class SamplerRegistry : public AllStatic {
433 public: 433 public:
434 enum State { 434 enum State {
435 HAS_NO_SAMPLERS, 435 HAS_NO_SAMPLERS,
436 HAS_SAMPLERS, 436 HAS_SAMPLERS,
437 HAS_CPU_PROFILING_SAMPLERS 437 HAS_CPU_PROFILING_SAMPLERS
438 }; 438 };
439 439
440 static void SetUp();
441
440 typedef void (*VisitSampler)(Sampler*, void*); 442 typedef void (*VisitSampler)(Sampler*, void*);
441 443
442 static State GetState(); 444 static State GetState();
443 445
444 // Iterates over all active samplers keeping the internal lock held. 446 // Iterates over all active samplers keeping the internal lock held.
445 // Returns whether there are any active samplers. 447 // Returns whether there are any active samplers.
446 static bool IterateActiveSamplers(VisitSampler func, void* param); 448 static bool IterateActiveSamplers(VisitSampler func, void* param);
447 449
448 // Adds/Removes an active sampler. 450 // Adds/Removes an active sampler.
449 static void AddActiveSampler(Sampler* sampler); 451 static void AddActiveSampler(Sampler* sampler);
(...skipping 13 matching lines...) Expand all
463 // Class that extracts stack trace, used for profiling. 465 // Class that extracts stack trace, used for profiling.
464 class StackTracer : public AllStatic { 466 class StackTracer : public AllStatic {
465 public: 467 public:
466 static void Trace(Isolate* isolate, TickSample* sample); 468 static void Trace(Isolate* isolate, TickSample* sample);
467 }; 469 };
468 470
469 } } // namespace v8::internal 471 } } // namespace v8::internal
470 472
471 473
472 #endif // V8_LOG_H_ 474 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « src/lazy-instance.h ('k') | src/log.cc » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698