<div class="gmail_extra"><div class="gmail_quote">Your subject line is a bit misleading, it's not yet in modern LLVM style... ;] Still, an improvement.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">
>From 049e77c972ab35097b81c78db478546c8e2bc928 Mon Sep 17 00:00:00 2001</div><div class="gmail_quote">From: Michael Spencer <<a href="mailto:bigcheesegs@gmail.com">bigcheesegs@gmail.com</a>></div><div class="gmail_quote">
Date: Tue, 7 Aug 2012 12:50:19 -0700</div><div class="gmail_quote">Subject: [PATCH] [Support] Clean up the Process interface to modern llvm</div><div class="gmail_quote"> style.</div><div class="gmail_quote"><br></div><div class="gmail_quote">
---</div><div class="gmail_quote"> include/llvm/Support/Process.h |  110 ++++++++++++++++++++++++++++++++++++++++</div><div class="gmail_quote"> 1 file changed, 110 insertions(+)</div><div class="gmail_quote"><br></div><div class="gmail_quote">
diff --git a/include/llvm/Support/Process.h b/include/llvm/Support/Process.h</div><div class="gmail_quote">index 088897c..c290d22 100644</div><div class="gmail_quote">--- a/include/llvm/Support/Process.h</div><div class="gmail_quote">
+++ b/include/llvm/Support/Process.h</div><div class="gmail_quote">@@ -18,6 +18,116 @@</div><div class="gmail_quote"> </div><div class="gmail_quote"> namespace llvm {</div><div class="gmail_quote"> namespace sys {</div><div class="gmail_quote">
+/// Get the virtual memory page size</div><div class="gmail_quote"><br></div><div class="gmail_quote">Use \brief.</div><div class="gmail_quote"><br></div><div class="gmail_quote">+///</div><div class="gmail_quote">+/// \returns The number of bytes in a virtual memory page.</div>
<div class="gmail_quote">+unsigned getPageSize();</div><div class="gmail_quote">+</div><div class="gmail_quote">+/// Get process memory usage.</div><div class="gmail_quote">+///</div><div class="gmail_quote">+/// This function will return the total amount of memory allocated by the</div>
<div class="gmail_quote">+/// process. This only counts the memory allocated via the malloc, calloc and</div><div class="gmail_quote">+/// realloc functions and includes any "free" holes in the allocated space.</div>
<div class="gmail_quote">+size_t getMallocUsage();</div><div class="gmail_quote">+</div><div class="gmail_quote">+/// This function will set \p user_time to the amount of CPU time spent in user</div><div class="gmail_quote">
+/// (non-kernel) mode and \p sys_time to the amount of CPU time spent in system</div><div class="gmail_quote">+/// (kernel) mode.  If the operating system does not support collection of these</div><div class="gmail_quote">
+/// metrics, a zero TimeValue will be for both values.</div><div class="gmail_quote">+void getTimeUsage(</div><div class="gmail_quote">+  TimeValue &Elapsed,</div><div class="gmail_quote">+    ///< Returns the TimeValue::now() giving current time</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Please no, this makes the actual signatures nearly impossible to read.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Use the much more widespread '\param' tag in the body of the doxygen comment above.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">+  TimeValue &UserTime,</div><div class="gmail_quote">+    ///< Returns the current amount of user time for the process</div><div class="gmail_quote">+  TimeValue &SysTime</div>
<div class="gmail_quote">+    ///< Returns the current amount of system time for the process</div><div class="gmail_quote">+  );</div><div class="gmail_quote"><br></div><div class="gmail_quote">And never put this on the next line. It makes it far too easy to omit or add extraneous ','s after parameters.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Also, by splitting every bit of this declaration across so many lines you make the diagnostic quality worse because we can't snippet anything effectively.</div>
</div></div>