OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_LOG_H_ | 5 #ifndef V8_LOG_H_ |
6 #define V8_LOG_H_ | 6 #define V8_LOG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void IntEvent(const char* name, int value); | 181 void IntEvent(const char* name, int value); |
182 void IntPtrTEvent(const char* name, intptr_t value); | 182 void IntPtrTEvent(const char* name, intptr_t value); |
183 | 183 |
184 // Emits an event with an handle value -> (name, location). | 184 // Emits an event with an handle value -> (name, location). |
185 void HandleEvent(const char* name, Object** location); | 185 void HandleEvent(const char* name, Object** location); |
186 | 186 |
187 // Emits memory management events for C allocated structures. | 187 // Emits memory management events for C allocated structures. |
188 void NewEvent(const char* name, void* object, size_t size); | 188 void NewEvent(const char* name, void* object, size_t size); |
189 void DeleteEvent(const char* name, void* object); | 189 void DeleteEvent(const char* name, void* object); |
190 | 190 |
191 // Static versions of the above, operate on current isolate's logger. | |
192 // Used in TRACK_MEMORY(TypeName) defined in globals.h | |
193 static void NewEventStatic(const char* name, void* object, size_t size); | |
194 static void DeleteEventStatic(const char* name, void* object); | |
195 | |
196 // Emits an event with a tag, and some resource usage information. | 191 // Emits an event with a tag, and some resource usage information. |
197 // -> (name, tag, <rusage information>). | 192 // -> (name, tag, <rusage information>). |
198 // Currently, the resource usage information is a process time stamp | 193 // Currently, the resource usage information is a process time stamp |
199 // and a real time timestamp. | 194 // and a real time timestamp. |
200 void ResourceEvent(const char* name, const char* tag); | 195 void ResourceEvent(const char* name, const char* tag); |
201 | 196 |
202 // Emits an event that an undefined property was read from an | 197 // Emits an event that an undefined property was read from an |
203 // object. | 198 // object. |
204 void SuspectReadEvent(Name* name, Object* obj); | 199 void SuspectReadEvent(Name* name, Object* obj); |
205 | 200 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 int length) = 0; | 528 int length) = 0; |
534 | 529 |
535 NameBuffer* name_buffer_; | 530 NameBuffer* name_buffer_; |
536 }; | 531 }; |
537 | 532 |
538 | 533 |
539 } } // namespace v8::internal | 534 } } // namespace v8::internal |
540 | 535 |
541 | 536 |
542 #endif // V8_LOG_H_ | 537 #endif // V8_LOG_H_ |
OLD | NEW |