summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-06 22:43:38 +0000
commitad332810078a0bbb8fa08fcbfdf3d756de6914f6 (patch)
tree1608b2db5d620d323673607ea7ddadfba9d58bda /indra/llcommon
parenta7d9a543e587ffe84b355db7a2e8193bfe6c68b6 (diff)
QAR-650 - Viewer RC 9 merge -> release (post cmake)
merge release@88802 Branch_1-20-Viewer-2-merge-1@89178 -> release
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.cpp23
-rw-r--r--indra/llcommon/llmemory.cpp115
-rw-r--r--indra/llcommon/llversionviewer.h2
3 files changed, 84 insertions, 56 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index fa3a01c191..1d85bc0e70 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1072,6 +1072,29 @@ namespace LLError
s.uniqueLogMessages[message] = 1;
}
}
+
+ if (site.mPrintOnce)
+ {
+ std::map<std::string, unsigned int>::iterator messageIter = s.uniqueLogMessages.find(message);
+ if (messageIter != s.uniqueLogMessages.end())
+ {
+ messageIter->second++;
+ unsigned int num_messages = messageIter->second;
+ if (num_messages == 10 || num_messages == 50 || (num_messages % 100) == 0)
+ {
+ prefix << "ONCE (" << num_messages << "th time seen): ";
+ }
+ else
+ {
+ return;
+ }
+ }
+ else
+ {
+ prefix << "ONCE: ";
+ s.uniqueLogMessages[message] = 1;
+ }
+ }
prefix << message;
message = prefix.str();
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 079f2b3258..4ca6a12435 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -314,72 +314,77 @@ U64 getCurrentRSS()
#elif defined(LL_DARWIN)
-static U32 getPageSize()
-{
- int ctl[2] = { CTL_HW, HW_PAGESIZE };
- int page_size;
- size_t size = sizeof(page_size);
-
- if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1)
- {
- llwarns << "Couldn't get page size" << llendl;
- return 0;
- } else {
- return page_size;
- }
-}
+// This can cause bad stalls! Replace with fast version
+
+// static U32 getPageSize()
+// {
+// int ctl[2] = { CTL_HW, HW_PAGESIZE };
+// int page_size;
+// size_t size = sizeof(page_size);
+
+// if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1)
+// {
+// llwarns << "Couldn't get page size" << llendl;
+// return 0;
+// } else {
+// return page_size;
+// }
+// }
U64 getCurrentRSS()
{
- task_t task = mach_task_self();
- vm_address_t addr = VM_MIN_ADDRESS;
- vm_size_t size = 0;
- U64 residentPages = 0;
-
- while (true)
- {
- mach_msg_type_number_t bcount = VM_REGION_BASIC_INFO_COUNT;
- vm_region_basic_info binfo;
- mach_port_t bobj;
- kern_return_t ret;
+ // Stalls!!!
+
+// task_t task = mach_task_self();
+// vm_address_t addr = VM_MIN_ADDRESS;
+// vm_size_t size = 0;
+// U64 residentPages = 0;
+
+// while (true)
+// {
+// mach_msg_type_number_t bcount = VM_REGION_BASIC_INFO_COUNT;
+// vm_region_basic_info binfo;
+// mach_port_t bobj;
+// kern_return_t ret;
- addr += size;
+// addr += size;
- ret = vm_region(task, &addr, &size, VM_REGION_BASIC_INFO,
- (vm_region_info_t) &binfo, &bcount, &bobj);
+// ret = vm_region(task, &addr, &size, VM_REGION_BASIC_INFO,
+// (vm_region_info_t) &binfo, &bcount, &bobj);
- if (ret != KERN_SUCCESS)
- {
- break;
- }
+// if (ret != KERN_SUCCESS)
+// {
+// break;
+// }
- if (bobj != MACH_PORT_NULL)
- {
- mach_port_deallocate(task, bobj);
- }
+// if (bobj != MACH_PORT_NULL)
+// {
+// mach_port_deallocate(task, bobj);
+// }
- mach_msg_type_number_t ecount = VM_REGION_EXTENDED_INFO_COUNT;
- vm_region_extended_info einfo;
- mach_port_t eobj;
-
- ret = vm_region(task, &addr, &size, VM_REGION_EXTENDED_INFO,
- (vm_region_info_t) &einfo, &ecount, &eobj);
-
- if (ret != KERN_SUCCESS)
- {
- llwarns << "vm_region failed" << llendl;
- return 0;
- }
+// mach_msg_type_number_t ecount = VM_REGION_EXTENDED_INFO_COUNT;
+// vm_region_extended_info einfo;
+// mach_port_t eobj;
+
+// ret = vm_region(task, &addr, &size, VM_REGION_EXTENDED_INFO,
+// (vm_region_info_t) &einfo, &ecount, &eobj);
+
+// if (ret != KERN_SUCCESS)
+// {
+// llwarns << "vm_region failed" << llendl;
+// return 0;
+// }
- if (eobj != MACH_PORT_NULL)
- {
- mach_port_deallocate(task, eobj);
- }
+// if (eobj != MACH_PORT_NULL)
+// {
+// mach_port_deallocate(task, eobj);
+// }
- residentPages += einfo.pages_resident;
- }
+// residentPages += einfo.pages_resident;
+// }
- return residentPages * getPageSize();
+// return residentPages * getPageSize();
+ return 0;
}
#elif defined(LL_LINUX)
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index d4bbef7e13..2cdb55eb19 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -34,7 +34,7 @@
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 20;
-const S32 LL_VERSION_PATCH = 6;
+const S32 LL_VERSION_PATCH = 9;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Release";