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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ticks_buffer_(sizeof(TickSampleEventRecord), | 50 ticks_buffer_(sizeof(TickSampleEventRecord), |
51 kTickSamplesBufferChunkSize, | 51 kTickSamplesBufferChunkSize, |
52 kTickSamplesBufferChunksCount), | 52 kTickSamplesBufferChunksCount), |
53 enqueue_order_(0) { } | 53 enqueue_order_(0) { } |
54 | 54 |
55 | 55 |
56 void ProfilerEventsProcessor::CallbackCreateEvent(Logger::LogEventsAndTags tag, | 56 void ProfilerEventsProcessor::CallbackCreateEvent(Logger::LogEventsAndTags tag, |
57 const char* prefix, | 57 const char* prefix, |
58 String* name, | 58 String* name, |
59 Address start) { | 59 Address start) { |
| 60 if (FilterOutCodeCreateEvent(tag)) return; |
60 CodeEventsContainer evt_rec; | 61 CodeEventsContainer evt_rec; |
61 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 62 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
62 rec->type = CodeEventRecord::CODE_CREATION; | 63 rec->type = CodeEventRecord::CODE_CREATION; |
63 rec->order = ++enqueue_order_; | 64 rec->order = ++enqueue_order_; |
64 rec->start = start; | 65 rec->start = start; |
65 rec->entry = generator_->NewCodeEntry(tag, prefix, name); | 66 rec->entry = generator_->NewCodeEntry(tag, prefix, name); |
66 rec->size = 1; | 67 rec->size = 1; |
67 events_buffer_.Enqueue(evt_rec); | 68 events_buffer_.Enqueue(evt_rec); |
68 } | 69 } |
69 | 70 |
70 | 71 |
71 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, | 72 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
72 String* name, | 73 String* name, |
73 String* resource_name, | 74 String* resource_name, |
74 int line_number, | 75 int line_number, |
75 Address start, | 76 Address start, |
76 unsigned size) { | 77 unsigned size) { |
| 78 if (FilterOutCodeCreateEvent(tag)) return; |
77 CodeEventsContainer evt_rec; | 79 CodeEventsContainer evt_rec; |
78 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 80 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
79 rec->type = CodeEventRecord::CODE_CREATION; | 81 rec->type = CodeEventRecord::CODE_CREATION; |
80 rec->order = ++enqueue_order_; | 82 rec->order = ++enqueue_order_; |
81 rec->start = start; | 83 rec->start = start; |
82 rec->entry = generator_->NewCodeEntry(tag, name, resource_name, line_number); | 84 rec->entry = generator_->NewCodeEntry(tag, name, resource_name, line_number); |
83 rec->size = size; | 85 rec->size = size; |
84 events_buffer_.Enqueue(evt_rec); | 86 events_buffer_.Enqueue(evt_rec); |
85 } | 87 } |
86 | 88 |
87 | 89 |
88 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, | 90 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
89 const char* name, | 91 const char* name, |
90 Address start, | 92 Address start, |
91 unsigned size) { | 93 unsigned size) { |
| 94 if (FilterOutCodeCreateEvent(tag)) return; |
92 CodeEventsContainer evt_rec; | 95 CodeEventsContainer evt_rec; |
93 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 96 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
94 rec->type = CodeEventRecord::CODE_CREATION; | 97 rec->type = CodeEventRecord::CODE_CREATION; |
95 rec->order = ++enqueue_order_; | 98 rec->order = ++enqueue_order_; |
96 rec->start = start; | 99 rec->start = start; |
97 rec->entry = generator_->NewCodeEntry(tag, name); | 100 rec->entry = generator_->NewCodeEntry(tag, name); |
98 rec->size = size; | 101 rec->size = size; |
99 events_buffer_.Enqueue(evt_rec); | 102 events_buffer_.Enqueue(evt_rec); |
100 } | 103 } |
101 | 104 |
102 | 105 |
103 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, | 106 void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
104 int args_count, | 107 int args_count, |
105 Address start, | 108 Address start, |
106 unsigned size) { | 109 unsigned size) { |
| 110 if (FilterOutCodeCreateEvent(tag)) return; |
107 CodeEventsContainer evt_rec; | 111 CodeEventsContainer evt_rec; |
108 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 112 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
109 rec->type = CodeEventRecord::CODE_CREATION; | 113 rec->type = CodeEventRecord::CODE_CREATION; |
110 rec->order = ++enqueue_order_; | 114 rec->order = ++enqueue_order_; |
111 rec->start = start; | 115 rec->start = start; |
112 rec->entry = generator_->NewCodeEntry(tag, args_count); | 116 rec->entry = generator_->NewCodeEntry(tag, args_count); |
113 rec->size = size; | 117 rec->size = size; |
114 events_buffer_.Enqueue(evt_rec); | 118 events_buffer_.Enqueue(evt_rec); |
115 } | 119 } |
116 | 120 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 CodeDeleteEvent(from); | 161 CodeDeleteEvent(from); |
158 } | 162 } |
159 | 163 |
160 | 164 |
161 void ProfilerEventsProcessor::RegExpCodeCreateEvent( | 165 void ProfilerEventsProcessor::RegExpCodeCreateEvent( |
162 Logger::LogEventsAndTags tag, | 166 Logger::LogEventsAndTags tag, |
163 const char* prefix, | 167 const char* prefix, |
164 String* name, | 168 String* name, |
165 Address start, | 169 Address start, |
166 unsigned size) { | 170 unsigned size) { |
| 171 if (FilterOutCodeCreateEvent(tag)) return; |
167 CodeEventsContainer evt_rec; | 172 CodeEventsContainer evt_rec; |
168 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 173 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
169 rec->type = CodeEventRecord::CODE_CREATION; | 174 rec->type = CodeEventRecord::CODE_CREATION; |
170 rec->order = ++enqueue_order_; | 175 rec->order = ++enqueue_order_; |
171 rec->start = start; | 176 rec->start = start; |
172 rec->entry = generator_->NewCodeEntry(tag, prefix, name); | 177 rec->entry = generator_->NewCodeEntry(tag, prefix, name); |
173 rec->size = size; | 178 rec->size = size; |
174 events_buffer_.Enqueue(evt_rec); | 179 events_buffer_.Enqueue(evt_rec); |
175 } | 180 } |
176 | 181 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 void CpuProfiler::TearDown() { | 480 void CpuProfiler::TearDown() { |
476 #ifdef ENABLE_CPP_PROFILES_PROCESSOR | 481 #ifdef ENABLE_CPP_PROFILES_PROCESSOR |
477 if (singleton_ != NULL) { | 482 if (singleton_ != NULL) { |
478 delete singleton_; | 483 delete singleton_; |
479 } | 484 } |
480 singleton_ = NULL; | 485 singleton_ = NULL; |
481 #endif | 486 #endif |
482 } | 487 } |
483 | 488 |
484 } } // namespace v8::internal | 489 } } // namespace v8::internal |
OLD | NEW |