summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmemory.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-07 21:16:39 -0700
committerRichard Linden <none@none>2013-09-07 21:16:39 -0700
commit3fd68662f267a3fd96d101834b3a9563bde3f61e (patch)
tree6379668ed488847d4404430932e928ea37015d42 /indra/llcommon/llmemory.cpp
parent736efc7b574635d5c86a97a33b456dd79a035777 (diff)
added memory usage and occlusion events to traces
renamed "current" to "primary" when referring to accumulators
Diffstat (limited to 'indra/llcommon/llmemory.cpp')
-rwxr-xr-xindra/llcommon/llmemory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index cb2f853070..e0b2aa87c2 100755
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -43,12 +43,15 @@
#include "llsys.h"
#include "llframetimer.h"
+#include "lltrace.h"
//----------------------------------------------------------------------------
//static
char* LLMemory::reserveMem = 0;
U32Kilobytes LLMemory::sAvailPhysicalMemInKB(U32_MAX);
U32Kilobytes LLMemory::sMaxPhysicalMemInKB(0);
+static LLTrace::SampleStatHandle<F64Megabytes> sAllocatedMem("allocated_mem", "active memory in use by application");
+static LLTrace::SampleStatHandle<F64Megabytes> sVirtualMem("virtual_mem", "virtual memory assigned to application");
U32Kilobytes LLMemory::sAllocatedMemInKB(0);
U32Kilobytes LLMemory::sAllocatedPageSizeInKB(0);
U32Kilobytes LLMemory::sMaxHeapSizeInKB(U32_MAX);
@@ -114,7 +117,9 @@ void LLMemory::updateMemoryInfo()
}
sAllocatedMemInKB = (U32Bytes)(counters.WorkingSetSize) ;
+ sample(sAllocatedMem, sAllocatedMemInKB);
sAllocatedPageSizeInKB = (U32Bytes)(counters.PagefileUsage) ;
+ sample(sVirtualMem, sAllocatedPageSizeInKB);
U32Kilobytes avail_phys, avail_virtual;
LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;