OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4940 | 4940 |
4941 | 4941 |
4942 const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) { | 4942 const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) { |
4943 IsDeadCheck("v8::HeapProfiler::FindSnapshot"); | 4943 IsDeadCheck("v8::HeapProfiler::FindSnapshot"); |
4944 return reinterpret_cast<const HeapSnapshot*>( | 4944 return reinterpret_cast<const HeapSnapshot*>( |
4945 i::HeapProfiler::FindSnapshot(uid)); | 4945 i::HeapProfiler::FindSnapshot(uid)); |
4946 } | 4946 } |
4947 | 4947 |
4948 | 4948 |
4949 const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title, | 4949 const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title, |
4950 HeapSnapshot::Type type) { | 4950 HeapSnapshot::Type type, |
| 4951 ActivityControl* control) { |
4951 IsDeadCheck("v8::HeapProfiler::TakeSnapshot"); | 4952 IsDeadCheck("v8::HeapProfiler::TakeSnapshot"); |
4952 i::HeapSnapshot::Type internal_type = i::HeapSnapshot::kFull; | 4953 i::HeapSnapshot::Type internal_type = i::HeapSnapshot::kFull; |
4953 switch (type) { | 4954 switch (type) { |
4954 case HeapSnapshot::kFull: | 4955 case HeapSnapshot::kFull: |
4955 internal_type = i::HeapSnapshot::kFull; | 4956 internal_type = i::HeapSnapshot::kFull; |
4956 break; | 4957 break; |
4957 case HeapSnapshot::kAggregated: | 4958 case HeapSnapshot::kAggregated: |
4958 internal_type = i::HeapSnapshot::kAggregated; | 4959 internal_type = i::HeapSnapshot::kAggregated; |
4959 break; | 4960 break; |
4960 default: | 4961 default: |
4961 UNREACHABLE(); | 4962 UNREACHABLE(); |
4962 } | 4963 } |
4963 return reinterpret_cast<const HeapSnapshot*>( | 4964 return reinterpret_cast<const HeapSnapshot*>( |
4964 i::HeapProfiler::TakeSnapshot(*Utils::OpenHandle(*title), internal_type)); | 4965 i::HeapProfiler::TakeSnapshot( |
| 4966 *Utils::OpenHandle(*title), internal_type, control)); |
4965 } | 4967 } |
4966 | 4968 |
4967 #endif // ENABLE_LOGGING_AND_PROFILING | 4969 #endif // ENABLE_LOGGING_AND_PROFILING |
4968 | 4970 |
4969 | 4971 |
4970 v8::Testing::StressType internal::Testing::stress_type_ = | 4972 v8::Testing::StressType internal::Testing::stress_type_ = |
4971 v8::Testing::kStressTypeOpt; | 4973 v8::Testing::kStressTypeOpt; |
4972 | 4974 |
4973 | 4975 |
4974 void Testing::SetStressRunType(Testing::StressType type) { | 4976 void Testing::SetStressRunType(Testing::StressType type) { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5103 | 5105 |
5104 | 5106 |
5105 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5107 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
5106 HandleScopeImplementer* thread_local = | 5108 HandleScopeImplementer* thread_local = |
5107 reinterpret_cast<HandleScopeImplementer*>(storage); | 5109 reinterpret_cast<HandleScopeImplementer*>(storage); |
5108 thread_local->IterateThis(v); | 5110 thread_local->IterateThis(v); |
5109 return storage + ArchiveSpacePerThread(); | 5111 return storage + ArchiveSpacePerThread(); |
5110 } | 5112 } |
5111 | 5113 |
5112 } } // namespace v8::internal | 5114 } } // namespace v8::internal |
OLD | NEW |