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

Side by Side Diff: src/heap-profiler.h

Issue 9139018: Provide a way for iterating through all external strings referenced from the JS heap (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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 2009-2010 the V8 project authors. All rights reserved. 1 // Copyright 2009-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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void DefineWrapperClass( 67 void DefineWrapperClass(
68 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); 68 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback);
69 69
70 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, 70 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id,
71 Object** wrapper); 71 Object** wrapper);
72 INLINE(bool is_profiling()) { 72 INLINE(bool is_profiling()) {
73 return snapshots_->is_tracking_objects(); 73 return snapshots_->is_tracking_objects();
74 } 74 }
75 75
76 class ExternalResourceVisitor {
mnaganov (inactive) 2012/01/11 18:50:23 Do you really need this class? What's wrong with u
yurys 2012/01/11 19:50:13 Done. I thought we try to work only with internal
77 public:
78 virtual void VisitExternalString(String* string) = 0;
79 virtual ~ExternalResourceVisitor() {}
80 };
81 static void VisitExternalResources(ExternalResourceVisitor* visitor);
mnaganov (inactive) 2012/01/11 18:50:23 The same is for the implementation. Perhaps, put t
yurys 2012/01/11 19:50:13 Done.
82
76 private: 83 private:
77 HeapProfiler(); 84 HeapProfiler();
78 ~HeapProfiler(); 85 ~HeapProfiler();
79 HeapSnapshot* TakeSnapshotImpl(const char* name, 86 HeapSnapshot* TakeSnapshotImpl(const char* name,
80 int type, 87 int type,
81 v8::ActivityControl* control); 88 v8::ActivityControl* control);
82 HeapSnapshot* TakeSnapshotImpl(String* name, 89 HeapSnapshot* TakeSnapshotImpl(String* name,
83 int type, 90 int type,
84 v8::ActivityControl* control); 91 v8::ActivityControl* control);
85 void ResetSnapshots(); 92 void ResetSnapshots();
86 93
87 HeapSnapshotsCollection* snapshots_; 94 HeapSnapshotsCollection* snapshots_;
88 unsigned next_snapshot_uid_; 95 unsigned next_snapshot_uid_;
89 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; 96 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
90 }; 97 };
91 98
92 } } // namespace v8::internal 99 } } // namespace v8::internal
93 100
94 #endif // V8_HEAP_PROFILER_H_ 101 #endif // V8_HEAP_PROFILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698