OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 3887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3898 i::Heap::AddGCEpilogueCallback(callback, gc_type); | 3898 i::Heap::AddGCEpilogueCallback(callback, gc_type); |
3899 } | 3899 } |
3900 | 3900 |
3901 | 3901 |
3902 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { | 3902 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { |
3903 if (IsDeadCheck("v8::V8::RemoveGCEpilogueCallback()")) return; | 3903 if (IsDeadCheck("v8::V8::RemoveGCEpilogueCallback()")) return; |
3904 i::Heap::RemoveGCEpilogueCallback(callback); | 3904 i::Heap::RemoveGCEpilogueCallback(callback); |
3905 } | 3905 } |
3906 | 3906 |
3907 | 3907 |
| 3908 void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, |
| 3909 ObjectSpace space, |
| 3910 AllocationAction action) { |
| 3911 if (IsDeadCheck("v8::V8::AddMemoryAllocationCallback()")) return; |
| 3912 i::MemoryAllocator::AddMemoryAllocationCallback(callback, |
| 3913 space, |
| 3914 action); |
| 3915 } |
| 3916 |
| 3917 |
| 3918 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { |
| 3919 if (IsDeadCheck("v8::V8::RemoveMemoryAllocationCallback()")) return; |
| 3920 i::MemoryAllocator::RemoveMemoryAllocationCallback(callback); |
| 3921 } |
| 3922 |
| 3923 |
3908 void V8::PauseProfiler() { | 3924 void V8::PauseProfiler() { |
3909 #ifdef ENABLE_LOGGING_AND_PROFILING | 3925 #ifdef ENABLE_LOGGING_AND_PROFILING |
3910 PauseProfilerEx(PROFILER_MODULE_CPU); | 3926 PauseProfilerEx(PROFILER_MODULE_CPU); |
3911 #endif | 3927 #endif |
3912 } | 3928 } |
3913 | 3929 |
3914 | 3930 |
3915 void V8::ResumeProfiler() { | 3931 void V8::ResumeProfiler() { |
3916 #ifdef ENABLE_LOGGING_AND_PROFILING | 3932 #ifdef ENABLE_LOGGING_AND_PROFILING |
3917 ResumeProfilerEx(PROFILER_MODULE_CPU); | 3933 ResumeProfilerEx(PROFILER_MODULE_CPU); |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4835 | 4851 |
4836 | 4852 |
4837 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4853 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
4838 HandleScopeImplementer* thread_local = | 4854 HandleScopeImplementer* thread_local = |
4839 reinterpret_cast<HandleScopeImplementer*>(storage); | 4855 reinterpret_cast<HandleScopeImplementer*>(storage); |
4840 thread_local->IterateThis(v); | 4856 thread_local->IterateThis(v); |
4841 return storage + ArchiveSpacePerThread(); | 4857 return storage + ArchiveSpacePerThread(); |
4842 } | 4858 } |
4843 | 4859 |
4844 } } // namespace v8::internal | 4860 } } // namespace v8::internal |
OLD | NEW |