Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
|
Jakob Kummerow
2012/02/07 07:44:01
nit: 2012
| |
| 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 35 #include "vm-state-inl.h" | 35 #include "vm-state-inl.h" |
| 36 | 36 |
| 37 #include "../include/v8-profiler.h" | 37 #include "../include/v8-profiler.h" |
| 38 | 38 |
| 39 namespace v8 { | 39 namespace v8 { |
| 40 namespace internal { | 40 namespace internal { |
| 41 | 41 |
| 42 static const int kEventsBufferSize = 256 * KB; | 42 static const int kEventsBufferSize = 256 * KB; |
| 43 static const int kTickSamplesBufferChunkSize = 64 * KB; | 43 static const int kTickSamplesBufferChunkSize = 64 * KB; |
| 44 static const int kTickSamplesBufferChunksCount = 16; | 44 static const int kTickSamplesBufferChunksCount = 16; |
| 45 static const int kProfilerStackSize = 32 * KB; | 45 static const int kProfilerStackSize = 64 * KB; |
| 46 | 46 |
| 47 | 47 |
| 48 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator) | 48 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator) |
| 49 : Thread(Thread::Options("v8:ProfEvntProc", kProfilerStackSize)), | 49 : Thread(Thread::Options("v8:ProfEvntProc", kProfilerStackSize)), |
| 50 generator_(generator), | 50 generator_(generator), |
| 51 running_(true), | 51 running_(true), |
| 52 ticks_buffer_(sizeof(TickSampleEventRecord), | 52 ticks_buffer_(sizeof(TickSampleEventRecord), |
| 53 kTickSamplesBufferChunkSize, | 53 kTickSamplesBufferChunkSize, |
| 54 kTickSamplesBufferChunksCount), | 54 kTickSamplesBufferChunksCount), |
| 55 enqueue_order_(0) { | 55 enqueue_order_(0) { |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 573 | 573 |
| 574 void CpuProfiler::TearDown() { | 574 void CpuProfiler::TearDown() { |
| 575 Isolate* isolate = Isolate::Current(); | 575 Isolate* isolate = Isolate::Current(); |
| 576 if (isolate->cpu_profiler() != NULL) { | 576 if (isolate->cpu_profiler() != NULL) { |
| 577 delete isolate->cpu_profiler(); | 577 delete isolate->cpu_profiler(); |
| 578 } | 578 } |
| 579 isolate->set_cpu_profiler(NULL); | 579 isolate->set_cpu_profiler(NULL); |
| 580 } | 580 } |
| 581 | 581 |
| 582 } } // namespace v8::internal | 582 } } // namespace v8::internal |
| OLD | NEW |