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

Side by Side Diff: src/IceCfg.h

Issue 1850163003: Subzero. Outputs liveness memory usage. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 8 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/IceCfg.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 /// \name Manage the CurrentNode field. 220 /// \name Manage the CurrentNode field.
221 /// CurrentNode is used for validating the Variable::DefNode field during 221 /// CurrentNode is used for validating the Variable::DefNode field during
222 /// dumping/emitting. 222 /// dumping/emitting.
223 /// @{ 223 /// @{
224 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; } 224 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; }
225 void resetCurrentNode() { setCurrentNode(nullptr); } 225 void resetCurrentNode() { setCurrentNode(nullptr); }
226 const CfgNode *getCurrentNode() const { return CurrentNode; } 226 const CfgNode *getCurrentNode() const { return CurrentNode; }
227 /// @} 227 /// @}
228 228
229 /// Get the total amount of memory held by the per-Cfg allocator. This is 229 /// Get the total amount of memory held by the per-Cfg allocator.
230 /// mostly meant for use inside a debugger. 230 size_t getTotalMemoryMB() const;
231 static size_t getTotalMemoryMB(); 231
232 /// Get the current memory usage due to liveness data structures.
233 size_t getLivenessMemoryMB() const;
232 234
233 void emit(); 235 void emit();
234 void emitIAS(); 236 void emitIAS();
235 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx, 237 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx,
236 const Assembler *Asm); 238 const Assembler *Asm);
237 void dump(const char *Message = ""); 239 void dump(const char *Message = "");
238 240
239 /// Allocate data of type T using the per-Cfg allocator. 241 /// Allocate data of type T using the per-Cfg allocator.
240 template <typename T> T *allocate() { return Allocator->Allocate<T>(); } 242 template <typename T> T *allocate() { return Allocator->Allocate<T>(); }
241 243
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 using OwnerType = Cfg; 344 using OwnerType = Cfg;
343 static StringPool *getStrings(const OwnerType *PoolOwner) { 345 static StringPool *getStrings(const OwnerType *PoolOwner) {
344 return PoolOwner->getVarStrings(); 346 return PoolOwner->getVarStrings();
345 } 347 }
346 }; 348 };
347 using VariableString = StringID<VariableStringPoolTraits>; 349 using VariableString = StringID<VariableStringPoolTraits>;
348 350
349 } // end of namespace Ice 351 } // end of namespace Ice
350 352
351 #endif // SUBZERO_SRC_ICECFG_H 353 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698