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

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: Fixes make presubmit 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') | src/IceGlobalContext.cpp » ('J')
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. This is
230 /// mostly meant for use inside a debugger. 230 /// mostly meant for use inside a debugger.
Jim Stichnoth 2016/04/01 15:22:34 Remove the "debugger" comment.
John 2016/04/01 18:05:51 Done.
231 static size_t getTotalMemoryMB(); 231 size_t getTotalMemoryMB() const;
Jim Stichnoth 2016/04/01 15:22:34 static - ah, oops! :)
John 2016/04/01 18:05:51 Acknowledged.
232
233 /// Get the current memory usage due to liveness data structures.
234 size_t getLivenessMemoryMB() const;
232 235
233 void emit(); 236 void emit();
234 void emitIAS(); 237 void emitIAS();
235 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx, 238 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx,
236 const Assembler *Asm); 239 const Assembler *Asm);
237 void dump(const char *Message = ""); 240 void dump(const char *Message = "");
238 241
239 /// Allocate data of type T using the per-Cfg allocator. 242 /// Allocate data of type T using the per-Cfg allocator.
240 template <typename T> T *allocate() { return Allocator->Allocate<T>(); } 243 template <typename T> T *allocate() { return Allocator->Allocate<T>(); }
241 244
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 using OwnerType = Cfg; 345 using OwnerType = Cfg;
343 static StringPool *getStrings(const OwnerType *PoolOwner) { 346 static StringPool *getStrings(const OwnerType *PoolOwner) {
344 return PoolOwner->getVarStrings(); 347 return PoolOwner->getVarStrings();
345 } 348 }
346 }; 349 };
347 using VariableString = StringID<VariableStringPoolTraits>; 350 using VariableString = StringID<VariableStringPoolTraits>;
348 351
349 } // end of namespace Ice 352 } // end of namespace Ice
350 353
351 #endif // SUBZERO_SRC_ICECFG_H 354 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | src/IceGlobalContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698