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

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

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « src/heap-inl.h ('k') | src/hydrogen.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 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name, 108 HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name,
109 int type, 109 int type,
110 v8::ActivityControl* control) { 110 v8::ActivityControl* control) {
111 HeapSnapshot::Type s_type = static_cast<HeapSnapshot::Type>(type); 111 HeapSnapshot::Type s_type = static_cast<HeapSnapshot::Type>(type);
112 HeapSnapshot* result = 112 HeapSnapshot* result =
113 snapshots_->NewSnapshot(s_type, name, next_snapshot_uid_++); 113 snapshots_->NewSnapshot(s_type, name, next_snapshot_uid_++);
114 bool generation_completed = true; 114 bool generation_completed = true;
115 switch (s_type) { 115 switch (s_type) {
116 case HeapSnapshot::kFull: { 116 case HeapSnapshot::kFull: {
117 HEAP->CollectAllGarbage(true);
118 HeapSnapshotGenerator generator(result, control); 117 HeapSnapshotGenerator generator(result, control);
119 generation_completed = generator.GenerateSnapshot(); 118 generation_completed = generator.GenerateSnapshot();
120 break; 119 break;
121 } 120 }
122 default: 121 default:
123 UNREACHABLE(); 122 UNREACHABLE();
124 } 123 }
125 if (!generation_completed) { 124 if (!generation_completed) {
126 delete result; 125 delete result;
127 result = NULL; 126 result = NULL;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 profiler->ResetSnapshots(); 164 profiler->ResetSnapshots();
166 } 165 }
167 166
168 167
169 void HeapProfiler::ObjectMoveEvent(Address from, Address to) { 168 void HeapProfiler::ObjectMoveEvent(Address from, Address to) {
170 snapshots_->ObjectMoveEvent(from, to); 169 snapshots_->ObjectMoveEvent(from, to);
171 } 170 }
172 171
173 172
174 } } // namespace v8::internal 173 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698