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 : Thread("v8:ProfEvntProc"), |
| 51 generator_(generator), |
51 running_(true), | 52 running_(true), |
52 ticks_buffer_(sizeof(TickSampleEventRecord), | 53 ticks_buffer_(sizeof(TickSampleEventRecord), |
53 kTickSamplesBufferChunkSize, | 54 kTickSamplesBufferChunkSize, |
54 kTickSamplesBufferChunksCount), | 55 kTickSamplesBufferChunksCount), |
55 enqueue_order_(0), | 56 enqueue_order_(0), |
56 known_functions_(new HashMap(AddressesMatch)) { | 57 known_functions_(new HashMap(AddressesMatch)) { |
57 } | 58 } |
58 | 59 |
59 | 60 |
60 ProfilerEventsProcessor::~ProfilerEventsProcessor() { | 61 ProfilerEventsProcessor::~ProfilerEventsProcessor() { |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 void CpuProfiler::TearDown() { | 609 void CpuProfiler::TearDown() { |
609 #ifdef ENABLE_LOGGING_AND_PROFILING | 610 #ifdef ENABLE_LOGGING_AND_PROFILING |
610 if (singleton_ != NULL) { | 611 if (singleton_ != NULL) { |
611 delete singleton_; | 612 delete singleton_; |
612 } | 613 } |
613 singleton_ = NULL; | 614 singleton_ = NULL; |
614 #endif | 615 #endif |
615 } | 616 } |
616 | 617 |
617 } } // namespace v8::internal | 618 } } // namespace v8::internal |
OLD | NEW |