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

Side by Side Diff: src/api.cc

Issue 9620007: Add HeapProfiler::GetPersistentHandleCount to be able to track the number of persistent handles (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 months 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
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 6051 matching lines...) Expand 10 before | Expand all | Expand 10 after
6062 IsDeadCheck(isolate, "v8::HeapProfiler::DeleteAllSnapshots"); 6062 IsDeadCheck(isolate, "v8::HeapProfiler::DeleteAllSnapshots");
6063 i::HeapProfiler::DeleteAllSnapshots(); 6063 i::HeapProfiler::DeleteAllSnapshots();
6064 } 6064 }
6065 6065
6066 6066
6067 void HeapProfiler::DefineWrapperClass(uint16_t class_id, 6067 void HeapProfiler::DefineWrapperClass(uint16_t class_id,
6068 WrapperInfoCallback callback) { 6068 WrapperInfoCallback callback) {
6069 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id, 6069 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id,
6070 callback); 6070 callback);
6071 } 6071 }
6072 6072
Vyacheslav Egorov (Chromium) 2012/03/07 17:07:02 One more empty line
6073 int HeapProfiler::GetPersistentHandleCount() {
6074 i::Isolate* isolate = i::Isolate::Current();
6075 return isolate->global_handles()->NumberOfGlobalHandles();
6076 }
6077
6073 6078
Vyacheslav Egorov (Chromium) 2012/03/07 17:07:02 One less empty line
6074 6079
6075 v8::Testing::StressType internal::Testing::stress_type_ = 6080 v8::Testing::StressType internal::Testing::stress_type_ =
6076 v8::Testing::kStressTypeOpt; 6081 v8::Testing::kStressTypeOpt;
6077 6082
6078 6083
6079 void Testing::SetStressRunType(Testing::StressType type) { 6084 void Testing::SetStressRunType(Testing::StressType type) {
6080 internal::Testing::set_stress_type(type); 6085 internal::Testing::set_stress_type(type);
6081 } 6086 }
6082 6087
6083 int Testing::GetStressRuns() { 6088 int Testing::GetStressRuns() {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
6194 6199
6195 6200
6196 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6201 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6197 HandleScopeImplementer* scope_implementer = 6202 HandleScopeImplementer* scope_implementer =
6198 reinterpret_cast<HandleScopeImplementer*>(storage); 6203 reinterpret_cast<HandleScopeImplementer*>(storage);
6199 scope_implementer->IterateThis(v); 6204 scope_implementer->IterateThis(v);
6200 return storage + ArchiveSpacePerThread(); 6205 return storage + ArchiveSpacePerThread();
6201 } 6206 }
6202 6207
6203 } } // namespace v8::internal 6208 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/global-handles.h » ('j') | test/cctest/test-heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698