| 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 30 matching lines...) Expand all Loading... |
| 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(Isolate* isolate, | 49 ProfilerEventsProcessor::ProfilerEventsProcessor(Isolate* isolate, |
| 50 ProfileGenerator* generator) | 50 ProfileGenerator* generator) |
| 51 : Thread(isolate), | 51 : Thread(isolate, "v8:ProfEvntProc"), |
| 52 generator_(generator), | 52 generator_(generator), |
| 53 running_(true), | 53 running_(true), |
| 54 ticks_buffer_(sizeof(TickSampleEventRecord), | 54 ticks_buffer_(sizeof(TickSampleEventRecord), |
| 55 kTickSamplesBufferChunkSize, | 55 kTickSamplesBufferChunkSize, |
| 56 kTickSamplesBufferChunksCount), | 56 kTickSamplesBufferChunksCount), |
| 57 enqueue_order_(0), | 57 enqueue_order_(0), |
| 58 known_functions_(new HashMap(AddressesMatch)) { | 58 known_functions_(new HashMap(AddressesMatch)) { |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 #ifdef ENABLE_LOGGING_AND_PROFILING | 621 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 622 Isolate* isolate = Isolate::Current(); | 622 Isolate* isolate = Isolate::Current(); |
| 623 if (isolate->cpu_profiler() != NULL) { | 623 if (isolate->cpu_profiler() != NULL) { |
| 624 delete isolate->cpu_profiler(); | 624 delete isolate->cpu_profiler(); |
| 625 } | 625 } |
| 626 isolate->set_cpu_profiler(NULL); | 626 isolate->set_cpu_profiler(NULL); |
| 627 #endif | 627 #endif |
| 628 } | 628 } |
| 629 | 629 |
| 630 } } // namespace v8::internal | 630 } } // namespace v8::internal |
| OLD | NEW |