Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: src/api.cc

Issue 5687003: New heap profiler: add support for progress reporting and control. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8-profiler.h ('k') | src/heap-profiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698