OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 * See also PauseProfiler(). | 2342 * See also PauseProfiler(). |
2343 */ | 2343 */ |
2344 static void ResumeProfiler(); | 2344 static void ResumeProfiler(); |
2345 | 2345 |
2346 /** | 2346 /** |
2347 * Return whether profiler is currently paused. | 2347 * Return whether profiler is currently paused. |
2348 */ | 2348 */ |
2349 static bool IsProfilerPaused(); | 2349 static bool IsProfilerPaused(); |
2350 | 2350 |
2351 /** | 2351 /** |
2352 * Resumes specified profiler modules. | 2352 * Resumes specified profiler modules. Can be called several times to |
| 2353 * mark the opening of a profiler events block with the given tag. |
| 2354 * |
2353 * "ResumeProfiler" is equivalent to "ResumeProfilerEx(PROFILER_MODULE_CPU)". | 2355 * "ResumeProfiler" is equivalent to "ResumeProfilerEx(PROFILER_MODULE_CPU)". |
2354 * See ProfilerModules enum. | 2356 * See ProfilerModules enum. |
2355 * | 2357 * |
2356 * \param flags Flags specifying profiler modules. | 2358 * \param flags Flags specifying profiler modules. |
| 2359 * \param tag Profile tag. |
2357 */ | 2360 */ |
2358 static void ResumeProfilerEx(int flags); | 2361 static void ResumeProfilerEx(int flags, int tag = 0); |
2359 | 2362 |
2360 /** | 2363 /** |
2361 * Pauses specified profiler modules. | 2364 * Pauses specified profiler modules. Each call to "PauseProfilerEx" closes |
| 2365 * a block of profiler events opened by a call to "ResumeProfilerEx" with the |
| 2366 * same tag value. There is no need for blocks to be properly nested. |
| 2367 * The profiler is paused when the last opened block is closed. |
| 2368 * |
2362 * "PauseProfiler" is equivalent to "PauseProfilerEx(PROFILER_MODULE_CPU)". | 2369 * "PauseProfiler" is equivalent to "PauseProfilerEx(PROFILER_MODULE_CPU)". |
2363 * See ProfilerModules enum. | 2370 * See ProfilerModules enum. |
2364 * | 2371 * |
2365 * \param flags Flags specifying profiler modules. | 2372 * \param flags Flags specifying profiler modules. |
| 2373 * \param tag Profile tag. |
2366 */ | 2374 */ |
2367 static void PauseProfilerEx(int flags); | 2375 static void PauseProfilerEx(int flags, int tag = 0); |
2368 | 2376 |
2369 /** | 2377 /** |
2370 * Returns active (resumed) profiler modules. | 2378 * Returns active (resumed) profiler modules. |
2371 * See ProfilerModules enum. | 2379 * See ProfilerModules enum. |
2372 * | 2380 * |
2373 * \returns active profiler modules. | 2381 * \returns active profiler modules. |
2374 */ | 2382 */ |
2375 static int GetActiveProfilerModules(); | 2383 static int GetActiveProfilerModules(); |
2376 | 2384 |
2377 /** | 2385 /** |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3267 | 3275 |
3268 } // namespace v8 | 3276 } // namespace v8 |
3269 | 3277 |
3270 | 3278 |
3271 #undef V8EXPORT | 3279 #undef V8EXPORT |
3272 #undef V8EXPORT_INLINE | 3280 #undef V8EXPORT_INLINE |
3273 #undef TYPE_CHECK | 3281 #undef TYPE_CHECK |
3274 | 3282 |
3275 | 3283 |
3276 #endif // V8_H_ | 3284 #endif // V8_H_ |
OLD | NEW |