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

Side by Side Diff: src/api.cc

Issue 96933003: Simplify allocation tracker API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 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 7479 matching lines...) Expand 10 before | Expand all | Expand 10 after
7490 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( 7490 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot(
7491 Handle<String> title, 7491 Handle<String> title,
7492 ActivityControl* control, 7492 ActivityControl* control,
7493 ObjectNameResolver* resolver) { 7493 ObjectNameResolver* resolver) {
7494 return reinterpret_cast<const HeapSnapshot*>( 7494 return reinterpret_cast<const HeapSnapshot*>(
7495 reinterpret_cast<i::HeapProfiler*>(this)->TakeSnapshot( 7495 reinterpret_cast<i::HeapProfiler*>(this)->TakeSnapshot(
7496 *Utils::OpenHandle(*title), control, resolver)); 7496 *Utils::OpenHandle(*title), control, resolver));
7497 } 7497 }
7498 7498
7499 7499
7500 void HeapProfiler::StartTrackingHeapObjects() { 7500 void HeapProfiler::StartTrackingHeapObjects(bool track_allocations) {
7501 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking(); 7501 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking(
7502 track_allocations);
7502 } 7503 }
7503 7504
7504 7505
7505 void HeapProfiler::StopTrackingHeapObjects() { 7506 void HeapProfiler::StopTrackingHeapObjects() {
7506 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking(); 7507 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking();
7507 } 7508 }
7508 7509
7509 7510
7510 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream) { 7511 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream) {
7511 return reinterpret_cast<i::HeapProfiler*>(this)->PushHeapObjectsStats(stream); 7512 return reinterpret_cast<i::HeapProfiler*>(this)->PushHeapObjectsStats(stream);
(...skipping 18 matching lines...) Expand all
7530 } 7531 }
7531 7532
7532 7533
7533 void HeapProfiler::SetRetainedObjectInfo(UniqueId id, 7534 void HeapProfiler::SetRetainedObjectInfo(UniqueId id,
7534 RetainedObjectInfo* info) { 7535 RetainedObjectInfo* info) {
7535 reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info); 7536 reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info);
7536 } 7537 }
7537 7538
7538 7539
7539 void HeapProfiler::StartRecordingHeapAllocations() { 7540 void HeapProfiler::StartRecordingHeapAllocations() {
7540 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapAllocationsRecording(); 7541 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking(true);
7541 } 7542 }
7542 7543
7543 7544
7544 void HeapProfiler::StopRecordingHeapAllocations() { 7545 void HeapProfiler::StopRecordingHeapAllocations() {
7545 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapAllocationsRecording(); 7546 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking();
7546 } 7547 }
7547 7548
7548 7549
7549 v8::Testing::StressType internal::Testing::stress_type_ = 7550 v8::Testing::StressType internal::Testing::stress_type_ =
7550 v8::Testing::kStressTypeOpt; 7551 v8::Testing::kStressTypeOpt;
7551 7552
7552 7553
7553 void Testing::SetStressRunType(Testing::StressType type) { 7554 void Testing::SetStressRunType(Testing::StressType type) {
7554 internal::Testing::set_stress_type(type); 7555 internal::Testing::set_stress_type(type);
7555 } 7556 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
7780 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7781 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7781 Address callback_address = 7782 Address callback_address =
7782 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7783 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7783 VMState<EXTERNAL> state(isolate); 7784 VMState<EXTERNAL> state(isolate);
7784 ExternalCallbackScope call_scope(isolate, callback_address); 7785 ExternalCallbackScope call_scope(isolate, callback_address);
7785 callback(info); 7786 callback(info);
7786 } 7787 }
7787 7788
7788 7789
7789 } } // namespace v8::internal 7790 } } // 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