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

Side by Side Diff: src/cpu-profiler.cc

Issue 2091019: CPU profiler: make code events handling scalable. (Closed)
Patch Set: Created 10 years, 7 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 28 matching lines...) Expand all
39 namespace internal { 39 namespace internal {
40 40
41 static const int kEventsBufferSize = 256*KB; 41 static const int kEventsBufferSize = 256*KB;
42 static const int kTickSamplesBufferChunkSize = 64*KB; 42 static const int kTickSamplesBufferChunkSize = 64*KB;
43 static const int kTickSamplesBufferChunksCount = 16; 43 static const int kTickSamplesBufferChunksCount = 16;
44 44
45 45
46 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator) 46 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator)
47 : generator_(generator), 47 : generator_(generator),
48 running_(false), 48 running_(false),
49 events_buffer_(kEventsBufferSize),
50 ticks_buffer_(sizeof(TickSampleEventRecord), 49 ticks_buffer_(sizeof(TickSampleEventRecord),
51 kTickSamplesBufferChunkSize, 50 kTickSamplesBufferChunkSize,
52 kTickSamplesBufferChunksCount), 51 kTickSamplesBufferChunksCount),
53 enqueue_order_(0) { } 52 enqueue_order_(0) { }
54 53
55 54
56 void ProfilerEventsProcessor::CallbackCreateEvent(Logger::LogEventsAndTags tag, 55 void ProfilerEventsProcessor::CallbackCreateEvent(Logger::LogEventsAndTags tag,
57 const char* prefix, 56 const char* prefix,
58 String* name, 57 String* name,
59 Address start) { 58 Address start) {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 void CpuProfiler::TearDown() { 503 void CpuProfiler::TearDown() {
505 #ifdef ENABLE_LOGGING_AND_PROFILING 504 #ifdef ENABLE_LOGGING_AND_PROFILING
506 if (singleton_ != NULL) { 505 if (singleton_ != NULL) {
507 delete singleton_; 506 delete singleton_;
508 } 507 }
509 singleton_ = NULL; 508 singleton_ = NULL;
510 #endif 509 #endif
511 } 510 }
512 511
513 } } // namespace v8::internal 512 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.h ('k') | src/cpu-profiler-inl.h » ('j') | src/unbound-queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698