OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3000 * Retrieve embedder-specific data from the isolate. | 3000 * Retrieve embedder-specific data from the isolate. |
3001 * Returns NULL if SetData has never been called. | 3001 * Returns NULL if SetData has never been called. |
3002 */ | 3002 */ |
3003 V8_INLINE(void* GetData()); | 3003 V8_INLINE(void* GetData()); |
3004 | 3004 |
3005 /** | 3005 /** |
3006 * Get statistics about the heap memory usage. | 3006 * Get statistics about the heap memory usage. |
3007 */ | 3007 */ |
3008 void GetHeapStatistics(HeapStatistics* heap_statistics); | 3008 void GetHeapStatistics(HeapStatistics* heap_statistics); |
3009 | 3009 |
3010 /** | |
3011 * Adjusts the amount of registered external memory. Used to give | |
3012 * V8 an indication of the amount of externally allocated memory | |
3013 * that is kept alive by JavaScript objects. V8 uses this to decide | |
3014 * when to perform global garbage collections. Registering | |
3015 * externally allocated memory will trigger global garbage | |
3016 * collections more often than otherwise in an attempt to garbage | |
Toon Verwaest
2013/03/13 12:57:33
than it would otherwise
Sven Panne
2013/03/13 13:14:13
Done.
| |
3017 * collect the JavaScript objects keeping the externally allocated | |
Toon Verwaest
2013/03/13 12:57:33
keeping -> that keep
Sven Panne
2013/03/13 13:14:13
Done.
| |
3018 * memory alive. | |
3019 * | |
3020 * \param change_in_bytes the change in externally allocated memory | |
3021 * that is kept alive by JavaScript objects. | |
3022 * \returns the adjusted value. | |
3023 */ | |
3024 intptr_t AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes); | |
3025 | |
3010 private: | 3026 private: |
3011 Isolate(); | 3027 Isolate(); |
3012 Isolate(const Isolate&); | 3028 Isolate(const Isolate&); |
3013 ~Isolate(); | 3029 ~Isolate(); |
3014 Isolate& operator=(const Isolate&); | 3030 Isolate& operator=(const Isolate&); |
3015 void* operator new(size_t size); | 3031 void* operator new(size_t size); |
3016 void operator delete(void*, size_t); | 3032 void operator delete(void*, size_t); |
3017 }; | 3033 }; |
3018 | 3034 |
3019 | 3035 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3480 * are not guaranteed to live past each call. The \p event_handler must | 3496 * are not guaranteed to live past each call. The \p event_handler must |
3481 * copy strings and other parameters it needs to keep around. | 3497 * copy strings and other parameters it needs to keep around. |
3482 * \note the set of events declared in JitCodeEvent::EventType is expected to | 3498 * \note the set of events declared in JitCodeEvent::EventType is expected to |
3483 * grow over time, and the JitCodeEvent structure is expected to accrue | 3499 * grow over time, and the JitCodeEvent structure is expected to accrue |
3484 * new members. The \p event_handler function must ignore event codes | 3500 * new members. The \p event_handler function must ignore event codes |
3485 * it does not recognize to maintain future compatibility. | 3501 * it does not recognize to maintain future compatibility. |
3486 */ | 3502 */ |
3487 static void SetJitCodeEventHandler(JitCodeEventOptions options, | 3503 static void SetJitCodeEventHandler(JitCodeEventOptions options, |
3488 JitCodeEventHandler event_handler); | 3504 JitCodeEventHandler event_handler); |
3489 | 3505 |
3490 /** | 3506 // TODO(svenpanne) Really deprecate me when Chrome is fixed. |
3491 * Adjusts the amount of registered external memory. Used to give | 3507 /** Deprecated. Use Isolate::AdjustAmountOfExternalAllocatedMemory instead. */ |
3492 * V8 an indication of the amount of externally allocated memory | |
3493 * that is kept alive by JavaScript objects. V8 uses this to decide | |
3494 * when to perform global garbage collections. Registering | |
3495 * externally allocated memory will trigger global garbage | |
3496 * collections more often than otherwise in an attempt to garbage | |
3497 * collect the JavaScript objects keeping the externally allocated | |
3498 * memory alive. | |
3499 * | |
3500 * \param change_in_bytes the change in externally allocated memory | |
3501 * that is kept alive by JavaScript objects. | |
3502 * \returns the adjusted value. | |
3503 */ | |
3504 static intptr_t AdjustAmountOfExternalAllocatedMemory( | 3508 static intptr_t AdjustAmountOfExternalAllocatedMemory( |
3505 intptr_t change_in_bytes); | 3509 intptr_t change_in_bytes); |
3506 | 3510 |
3507 /** | 3511 /** |
3508 * Suspends recording of tick samples in the profiler. | 3512 * Suspends recording of tick samples in the profiler. |
3509 * When the V8 profiling mode is enabled (usually via command line | 3513 * When the V8 profiling mode is enabled (usually via command line |
3510 * switches) this function suspends recording of tick samples. | 3514 * switches) this function suspends recording of tick samples. |
3511 * Profiling ticks are discarded until ResumeProfiler() is called. | 3515 * Profiling ticks are discarded until ResumeProfiler() is called. |
3512 * | 3516 * |
3513 * See also the --prof and --prof_auto command line switches to | 3517 * See also the --prof and --prof_auto command line switches to |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5021 | 5025 |
5022 | 5026 |
5023 } // namespace v8 | 5027 } // namespace v8 |
5024 | 5028 |
5025 | 5029 |
5026 #undef V8EXPORT | 5030 #undef V8EXPORT |
5027 #undef TYPE_CHECK | 5031 #undef TYPE_CHECK |
5028 | 5032 |
5029 | 5033 |
5030 #endif // V8_H_ | 5034 #endif // V8_H_ |
OLD | NEW |