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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 | 64 |
65 TickSampleEventRecord* TickSampleEventRecord::init(void* value) { | 65 TickSampleEventRecord* TickSampleEventRecord::init(void* value) { |
66 TickSampleEventRecord* result = | 66 TickSampleEventRecord* result = |
67 reinterpret_cast<TickSampleEventRecord*>(value); | 67 reinterpret_cast<TickSampleEventRecord*>(value); |
68 result->filler = 1; | 68 result->filler = 1; |
69 ASSERT(result->filler != SamplingCircularQueue::kClear); | 69 ASSERT(result->filler != SamplingCircularQueue::kClear); |
70 // Init the required fields only. | 70 // Init the required fields only. |
71 result->sample.pc = NULL; | 71 result->sample.pc = NULL; |
72 result->sample.frames_count = 0; | 72 result->sample.frames_count = 0; |
| 73 result->sample.has_external_callback = false; |
73 return result; | 74 return result; |
74 } | 75 } |
75 | 76 |
76 | 77 |
77 TickSample* ProfilerEventsProcessor::TickSampleEvent() { | 78 TickSample* ProfilerEventsProcessor::TickSampleEvent() { |
78 generator_->Tick(); | 79 generator_->Tick(); |
79 TickSampleEventRecord* evt = | 80 TickSampleEventRecord* evt = |
80 TickSampleEventRecord::init(ticks_buffer_.Enqueue()); | 81 TickSampleEventRecord::init(ticks_buffer_.Enqueue()); |
81 evt->order = enqueue_order_; // No increment! | 82 evt->order = enqueue_order_; // No increment! |
82 return &evt->sample; | 83 return &evt->sample; |
83 } | 84 } |
84 | 85 |
85 | 86 |
86 bool ProfilerEventsProcessor::FilterOutCodeCreateEvent( | 87 bool ProfilerEventsProcessor::FilterOutCodeCreateEvent( |
87 Logger::LogEventsAndTags tag) { | 88 Logger::LogEventsAndTags tag) { |
88 return FLAG_prof_browser_mode | 89 return FLAG_prof_browser_mode |
89 && (tag != Logger::CALLBACK_TAG | 90 && (tag != Logger::CALLBACK_TAG |
90 && tag != Logger::FUNCTION_TAG | 91 && tag != Logger::FUNCTION_TAG |
91 && tag != Logger::LAZY_COMPILE_TAG | 92 && tag != Logger::LAZY_COMPILE_TAG |
92 && tag != Logger::REG_EXP_TAG | 93 && tag != Logger::REG_EXP_TAG |
93 && tag != Logger::SCRIPT_TAG); | 94 && tag != Logger::SCRIPT_TAG); |
94 } | 95 } |
95 | 96 |
96 } } // namespace v8::internal | 97 } } // namespace v8::internal |
97 | 98 |
98 #endif // ENABLE_LOGGING_AND_PROFILING | 99 #endif // ENABLE_LOGGING_AND_PROFILING |
99 | 100 |
100 #endif // V8_CPU_PROFILER_INL_H_ | 101 #endif // V8_CPU_PROFILER_INL_H_ |
OLD | NEW |