| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 namespace v8 { | 41 namespace v8 { |
| 42 namespace internal { | 42 namespace internal { |
| 43 | 43 |
| 44 static const int kEventsBufferSize = 256*KB; | 44 static const int kEventsBufferSize = 256*KB; |
| 45 static const int kTickSamplesBufferChunkSize = 64*KB; | 45 static const int kTickSamplesBufferChunkSize = 64*KB; |
| 46 static const int kTickSamplesBufferChunksCount = 16; | 46 static const int kTickSamplesBufferChunksCount = 16; |
| 47 | 47 |
| 48 | 48 |
| 49 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator) | 49 ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator) |
| 50 : generator_(generator), | 50 : |
| 51 #ifdef DEBUG_THREAD_NAMES |
| 52 Thread("v8:ProfEvntProc"), |
| 53 #endif |
| 54 generator_(generator), |
| 51 running_(true), | 55 running_(true), |
| 52 ticks_buffer_(sizeof(TickSampleEventRecord), | 56 ticks_buffer_(sizeof(TickSampleEventRecord), |
| 53 kTickSamplesBufferChunkSize, | 57 kTickSamplesBufferChunkSize, |
| 54 kTickSamplesBufferChunksCount), | 58 kTickSamplesBufferChunksCount), |
| 55 enqueue_order_(0), | 59 enqueue_order_(0), |
| 56 known_functions_(new HashMap(AddressesMatch)) { | 60 known_functions_(new HashMap(AddressesMatch)) { |
| 57 } | 61 } |
| 58 | 62 |
| 59 | 63 |
| 60 ProfilerEventsProcessor::~ProfilerEventsProcessor() { | 64 ProfilerEventsProcessor::~ProfilerEventsProcessor() { |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 void CpuProfiler::TearDown() { | 612 void CpuProfiler::TearDown() { |
| 609 #ifdef ENABLE_LOGGING_AND_PROFILING | 613 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 610 if (singleton_ != NULL) { | 614 if (singleton_ != NULL) { |
| 611 delete singleton_; | 615 delete singleton_; |
| 612 } | 616 } |
| 613 singleton_ = NULL; | 617 singleton_ = NULL; |
| 614 #endif | 618 #endif |
| 615 } | 619 } |
| 616 | 620 |
| 617 } } // namespace v8::internal | 621 } } // namespace v8::internal |
| OLD | NEW |