OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4972 | 4972 |
4973 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { | 4973 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { |
4974 i::Isolate* isolate = i::Isolate::Current(); | 4974 i::Isolate* isolate = i::Isolate::Current(); |
4975 if (IsDeadCheck(isolate, "v8::V8::RemoveMemoryAllocationCallback()")) return; | 4975 if (IsDeadCheck(isolate, "v8::V8::RemoveMemoryAllocationCallback()")) return; |
4976 isolate->memory_allocator()->RemoveMemoryAllocationCallback( | 4976 isolate->memory_allocator()->RemoveMemoryAllocationCallback( |
4977 callback); | 4977 callback); |
4978 } | 4978 } |
4979 | 4979 |
4980 | 4980 |
4981 void V8::PauseProfiler() { | 4981 void V8::PauseProfiler() { |
4982 ApiCheck(i::FLAG_prof, | |
4983 "V8::ResumeProfiler", | |
4984 "Profiling has to be enabled with --prof"); | |
4985 i::Isolate* isolate = i::Isolate::Current(); | 4982 i::Isolate* isolate = i::Isolate::Current(); |
4986 isolate->logger()->PauseProfiler(); | 4983 isolate->logger()->PauseProfiler(); |
4987 } | 4984 } |
4988 | 4985 |
4989 | 4986 |
4990 void V8::ResumeProfiler() { | 4987 void V8::ResumeProfiler() { |
4991 ApiCheck(i::FLAG_prof, | |
4992 "V8::ResumeProfiler", | |
4993 "Profiling has to be enabled with --prof"); | |
4994 i::Isolate* isolate = i::Isolate::Current(); | 4988 i::Isolate* isolate = i::Isolate::Current(); |
4995 isolate->logger()->ResumeProfiler(); | 4989 isolate->logger()->ResumeProfiler(); |
4996 } | 4990 } |
4997 | 4991 |
4998 | 4992 |
4999 bool V8::IsProfilerPaused() { | 4993 bool V8::IsProfilerPaused() { |
5000 i::Isolate* isolate = i::Isolate::Current(); | 4994 i::Isolate* isolate = i::Isolate::Current(); |
5001 return isolate->logger()->IsProfilerPaused(); | 4995 return isolate->logger()->IsProfilerPaused(); |
5002 } | 4996 } |
5003 | 4997 |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6044 | 6038 |
6045 | 6039 |
6046 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6040 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6047 HandleScopeImplementer* scope_implementer = | 6041 HandleScopeImplementer* scope_implementer = |
6048 reinterpret_cast<HandleScopeImplementer*>(storage); | 6042 reinterpret_cast<HandleScopeImplementer*>(storage); |
6049 scope_implementer->IterateThis(v); | 6043 scope_implementer->IterateThis(v); |
6050 return storage + ArchiveSpacePerThread(); | 6044 return storage + ArchiveSpacePerThread(); |
6051 } | 6045 } |
6052 | 6046 |
6053 } } // namespace v8::internal | 6047 } } // namespace v8::internal |
OLD | NEW |