| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 static void TearDown(); | 152 static void TearDown(); |
| 153 | 153 |
| 154 // Enable the computation of a sliding window of states. | 154 // Enable the computation of a sliding window of states. |
| 155 static void EnableSlidingStateWindow(); | 155 static void EnableSlidingStateWindow(); |
| 156 | 156 |
| 157 // Emits an event with a string value -> (name, value). | 157 // Emits an event with a string value -> (name, value). |
| 158 static void StringEvent(const char* name, const char* value); | 158 static void StringEvent(const char* name, const char* value); |
| 159 | 159 |
| 160 // Emits an event with an int value -> (name, value). | 160 // Emits an event with an int value -> (name, value). |
| 161 static void IntEvent(const char* name, int value); | 161 static void IntEvent(const char* name, int value); |
| 162 static void IntPtrTEvent(const char* name, intptr_t value); |
| 162 | 163 |
| 163 // Emits an event with an handle value -> (name, location). | 164 // Emits an event with an handle value -> (name, location). |
| 164 static void HandleEvent(const char* name, Object** location); | 165 static void HandleEvent(const char* name, Object** location); |
| 165 | 166 |
| 166 // Emits memory management events for C allocated structures. | 167 // Emits memory management events for C allocated structures. |
| 167 static void NewEvent(const char* name, void* object, size_t size); | 168 static void NewEvent(const char* name, void* object, size_t size); |
| 168 static void DeleteEvent(const char* name, void* object); | 169 static void DeleteEvent(const char* name, void* object); |
| 169 | 170 |
| 170 // Emits an event with a tag, and some resource usage information. | 171 // Emits an event with a tag, and some resource usage information. |
| 171 // -> (name, tag, <rusage information>). | 172 // -> (name, tag, <rusage information>). |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 static void HeapSampleBeginEvent(const char* space, const char* kind); | 231 static void HeapSampleBeginEvent(const char* space, const char* kind); |
| 231 static void HeapSampleEndEvent(const char* space, const char* kind); | 232 static void HeapSampleEndEvent(const char* space, const char* kind); |
| 232 static void HeapSampleItemEvent(const char* type, int number, int bytes); | 233 static void HeapSampleItemEvent(const char* type, int number, int bytes); |
| 233 static void HeapSampleJSConstructorEvent(const char* constructor, | 234 static void HeapSampleJSConstructorEvent(const char* constructor, |
| 234 int number, int bytes); | 235 int number, int bytes); |
| 235 static void HeapSampleJSRetainersEvent(const char* constructor, | 236 static void HeapSampleJSRetainersEvent(const char* constructor, |
| 236 const char* event); | 237 const char* event); |
| 237 static void HeapSampleJSProducerEvent(const char* constructor, | 238 static void HeapSampleJSProducerEvent(const char* constructor, |
| 238 Address* stack); | 239 Address* stack); |
| 239 static void HeapSampleStats(const char* space, const char* kind, | 240 static void HeapSampleStats(const char* space, const char* kind, |
| 240 int capacity, int used); | 241 intptr_t capacity, intptr_t used); |
| 241 | 242 |
| 242 static void SharedLibraryEvent(const char* library_path, | 243 static void SharedLibraryEvent(const char* library_path, |
| 243 uintptr_t start, | 244 uintptr_t start, |
| 244 uintptr_t end); | 245 uintptr_t end); |
| 245 static void SharedLibraryEvent(const wchar_t* library_path, | 246 static void SharedLibraryEvent(const wchar_t* library_path, |
| 246 uintptr_t start, | 247 uintptr_t start, |
| 247 uintptr_t end); | 248 uintptr_t end); |
| 248 | 249 |
| 249 // ==== Events logged by --log-regexp ==== | 250 // ==== Events logged by --log-regexp ==== |
| 250 // Regexp compilation and execution events. | 251 // Regexp compilation and execution events. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // Emits a profiler tick event. Used by the profiler thread. | 320 // Emits a profiler tick event. Used by the profiler thread. |
| 320 static void TickEvent(TickSample* sample, bool overflow); | 321 static void TickEvent(TickSample* sample, bool overflow); |
| 321 | 322 |
| 322 static void ApiEvent(const char* name, ...); | 323 static void ApiEvent(const char* name, ...); |
| 323 | 324 |
| 324 // Logs a StringEvent regardless of whether FLAG_log is true. | 325 // Logs a StringEvent regardless of whether FLAG_log is true. |
| 325 static void UncheckedStringEvent(const char* name, const char* value); | 326 static void UncheckedStringEvent(const char* name, const char* value); |
| 326 | 327 |
| 327 // Logs an IntEvent regardless of whether FLAG_log is true. | 328 // Logs an IntEvent regardless of whether FLAG_log is true. |
| 328 static void UncheckedIntEvent(const char* name, int value); | 329 static void UncheckedIntEvent(const char* name, int value); |
| 330 static void UncheckedIntPtrTEvent(const char* name, intptr_t value); |
| 329 | 331 |
| 330 // Stops logging and profiling in case of insufficient resources. | 332 // Stops logging and profiling in case of insufficient resources. |
| 331 static void StopLoggingAndProfiling(); | 333 static void StopLoggingAndProfiling(); |
| 332 | 334 |
| 333 // Returns whether profiler's sampler is active. | 335 // Returns whether profiler's sampler is active. |
| 334 static bool IsProfilerSamplerActive(); | 336 static bool IsProfilerSamplerActive(); |
| 335 | 337 |
| 336 // The sampler used by the profiler and the sliding state window. | 338 // The sampler used by the profiler and the sliding state window. |
| 337 static Ticker* ticker_; | 339 static Ticker* ticker_; |
| 338 | 340 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // Class that extracts stack trace, used for profiling. | 379 // Class that extracts stack trace, used for profiling. |
| 378 class StackTracer : public AllStatic { | 380 class StackTracer : public AllStatic { |
| 379 public: | 381 public: |
| 380 static void Trace(TickSample* sample); | 382 static void Trace(TickSample* sample); |
| 381 }; | 383 }; |
| 382 | 384 |
| 383 } } // namespace v8::internal | 385 } } // namespace v8::internal |
| 384 | 386 |
| 385 | 387 |
| 386 #endif // V8_LOG_H_ | 388 #endif // V8_LOG_H_ |
| OLD | NEW |