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

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

Issue 10535096: Implement heap profiler memory usage reporting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make sizeof to be conformant to C++ guide. Created 8 years, 6 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (profiler != NULL && profiler->is_profiling()) { \ 42 if (profiler != NULL && profiler->is_profiling()) { \
43 profiler->call; \ 43 profiler->call; \
44 } \ 44 } \
45 } while (false) 45 } while (false)
46 46
47 class HeapProfiler { 47 class HeapProfiler {
48 public: 48 public:
49 static void SetUp(); 49 static void SetUp();
50 static void TearDown(); 50 static void TearDown();
51 51
52 static size_t GetMemorySizeUsedByProfiler();
53
52 static HeapSnapshot* TakeSnapshot(const char* name, 54 static HeapSnapshot* TakeSnapshot(const char* name,
53 int type, 55 int type,
54 v8::ActivityControl* control); 56 v8::ActivityControl* control);
55 static HeapSnapshot* TakeSnapshot(String* name, 57 static HeapSnapshot* TakeSnapshot(String* name,
56 int type, 58 int type,
57 v8::ActivityControl* control); 59 v8::ActivityControl* control);
58 60
59 static void StartHeapObjectsTracking(); 61 static void StartHeapObjectsTracking();
60 static void StopHeapObjectsTracking(); 62 static void StopHeapObjectsTracking();
61 static SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); 63 static SnapshotObjectId PushHeapObjectsStats(OutputStream* stream);
(...skipping 30 matching lines...) Expand all
92 SnapshotObjectId PushHeapObjectsStatsImpl(OutputStream* stream); 94 SnapshotObjectId PushHeapObjectsStatsImpl(OutputStream* stream);
93 95
94 HeapSnapshotsCollection* snapshots_; 96 HeapSnapshotsCollection* snapshots_;
95 unsigned next_snapshot_uid_; 97 unsigned next_snapshot_uid_;
96 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; 98 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
97 }; 99 };
98 100
99 } } // namespace v8::internal 101 } } // namespace v8::internal
100 102
101 #endif // V8_HEAP_PROFILER_H_ 103 #endif // V8_HEAP_PROFILER_H_
OLDNEW
« include/v8-profiler.h ('K') | « src/api.cc ('k') | src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698