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

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

Issue 195102: Fix ARM build (gcc 3.3 failed to resolve types correctly) and constants names. (Closed)
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | src/heap-profiler.cc » ('j') | src/heap-profiler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 }; 194 };
195 typedef ZoneSplayTree<ClusterEqualityConfig> EqualityTree; 195 typedef ZoneSplayTree<ClusterEqualityConfig> EqualityTree;
196 196
197 static int ClusterBackRefsCmp( 197 static int ClusterBackRefsCmp(
198 const ClusterBackRefs* a, const ClusterBackRefs* b) { 198 const ClusterBackRefs* a, const ClusterBackRefs* b) {
199 return ClusterBackRefs::Compare(*a, *b); 199 return ClusterBackRefs::Compare(*a, *b);
200 } 200 }
201 int DoProcess(JSObjectsClusterTree* tree); 201 int DoProcess(JSObjectsClusterTree* tree);
202 int FillEqualityTree(); 202 int FillEqualityTree();
203 203
204 static const int INITIAL_BACKREFS_LIST_CAPACITY = 2; 204 static const int kInitialBackrefsListCapacity = 2;
205 static const int INITIAL_SIMILARITY_LIST_CAPACITY = 2000; 205 static const int kInitialSimilarityListCapacity = 2000;
206 // Number of passes for finding equivalents. Limits the length of paths 206 // Number of passes for finding equivalents. Limits the length of paths
207 // that can be considered equivalent. 207 // that can be considered equivalent.
208 static const int MAX_PASSES_COUNT = 10; 208 static const int kMaxPassesCount = 10;
209 209
210 ZoneScope zscope_; 210 ZoneScope zscope_;
211 SimilarityList simList_; 211 SimilarityList simList_;
212 EqualityTree eqTree_; 212 EqualityTree eqTree_;
213 ClusterBackRefs* currentPair_; 213 ClusterBackRefs* currentPair_;
214 JSObjectsClusterTree* currentSet_; 214 JSObjectsClusterTree* currentSet_;
215 }; 215 };
216 216
217 217
218 // RetainerHeapProfile is responsible for gathering and logging 218 // RetainerHeapProfile is responsible for gathering and logging
(...skipping 11 matching lines...) Expand all
230 RetainerHeapProfile(); 230 RetainerHeapProfile();
231 void CollectStats(HeapObject* obj); 231 void CollectStats(HeapObject* obj);
232 void PrintStats(); 232 void PrintStats();
233 void DebugPrintStats(Printer* printer); 233 void DebugPrintStats(Printer* printer);
234 void StoreReference(const JSObjectsCluster& cluster, Object* ref); 234 void StoreReference(const JSObjectsCluster& cluster, Object* ref);
235 235
236 private: 236 private:
237 JSObjectsCluster Clusterize(Object* obj); 237 JSObjectsCluster Clusterize(Object* obj);
238 238
239 // Limit on the number of retainers to be printed per cluster. 239 // Limit on the number of retainers to be printed per cluster.
240 static const int MAX_RETAINERS_TO_PRINT = 50; 240 static const int kMaxRetainersToPrint = 50;
241 ZoneScope zscope_; 241 ZoneScope zscope_;
242 JSObjectsClusterTree retainers_tree_; 242 JSObjectsClusterTree retainers_tree_;
243 ClustersCoarser coarser_; 243 ClustersCoarser coarser_;
244 // TODO(mnaganov): Use some helper class to hold these state variables. 244 // TODO(mnaganov): Use some helper class to hold these state variables.
245 JSObjectsClusterTree* coarse_cluster_tree_; 245 JSObjectsClusterTree* coarse_cluster_tree_;
246 int retainers_printed_; 246 int retainers_printed_;
247 Printer* current_printer_; 247 Printer* current_printer_;
248 StringStream* current_stream_; 248 StringStream* current_stream_;
249 public: 249 public:
250 // Used by JSObjectsClusterTree::ForEach. 250 // Used by JSObjectsClusterTree::ForEach.
251 void Call(const JSObjectsCluster& cluster, JSObjectsClusterTree* tree); 251 void Call(const JSObjectsCluster& cluster, JSObjectsClusterTree* tree);
252 }; 252 };
253 253
254 254
255 #endif // ENABLE_LOGGING_AND_PROFILING 255 #endif // ENABLE_LOGGING_AND_PROFILING
256 256
257 } } // namespace v8::internal 257 } } // namespace v8::internal
258 258
259 #endif // V8_HEAP_PROFILER_H_ 259 #endif // V8_HEAP_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap-profiler.cc » ('j') | src/heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698