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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 // Pause/Resume collection of profiling data. | 209 // Pause/Resume collection of profiling data. |
210 // When data collection is paused, Tick events are discarded until | 210 // When data collection is paused, Tick events are discarded until |
211 // data collection is Resumed. | 211 // data collection is Resumed. |
212 static bool IsProfilerPaused(); | 212 static bool IsProfilerPaused(); |
213 static void PauseProfiler(); | 213 static void PauseProfiler(); |
214 static void ResumeProfiler(); | 214 static void ResumeProfiler(); |
215 | 215 |
216 private: | 216 private: |
217 | 217 |
| 218 // Calculate the size of the code object to report for log events. This takes |
| 219 // the layout of the code object into account. |
| 220 static int CodeObjectSize(Code* code); |
| 221 |
218 // Emits the source code of a regexp. Used by regexp events. | 222 // Emits the source code of a regexp. Used by regexp events. |
219 static void LogRegExpSource(Handle<JSRegExp> regexp); | 223 static void LogRegExpSource(Handle<JSRegExp> regexp); |
220 | 224 |
221 // Emits a profiler tick event. Used by the profiler thread. | 225 // Emits a profiler tick event. Used by the profiler thread. |
222 static void TickEvent(TickSample* sample, bool overflow); | 226 static void TickEvent(TickSample* sample, bool overflow); |
223 | 227 |
224 static void ApiEvent(const char* name, ...); | 228 static void ApiEvent(const char* name, ...); |
225 | 229 |
226 // Logs a StringEvent regardless of whether FLAG_log is true. | 230 // Logs a StringEvent regardless of whether FLAG_log is true. |
227 static void UncheckedStringEvent(const char* name, const char* value); | 231 static void UncheckedStringEvent(const char* name, const char* value); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 friend class Profiler; | 268 friend class Profiler; |
265 friend class SlidingStateWindow; | 269 friend class SlidingStateWindow; |
266 friend class VMState; | 270 friend class VMState; |
267 #endif | 271 #endif |
268 }; | 272 }; |
269 | 273 |
270 | 274 |
271 } } // namespace v8::internal | 275 } } // namespace v8::internal |
272 | 276 |
273 #endif // V8_LOG_H_ | 277 #endif // V8_LOG_H_ |
OLD | NEW |