diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 78 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/de/menu_viewer.xml | 9 |
2 files changed, 83 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 7cd06c9c37..1266a94287 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1597,12 +1597,82 @@ U32 LLWindowSDL::SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain) return mGrabbyKeyFlags; } + +void check_vm_bloat() +{ +#if LL_LINUX + // watch our own VM and RSS sizes, warn if we bloated rapidly + FILE *fp = fopen("/proc/self/stat", "r"); + if (fp) + { + static long long last_vm_size = 0; + static long long last_rss_size = 0; + const long long significant_vm_difference = 250 * 1024*1024; + const long long significant_rss_difference = 50 * 1024*1024; + + size_t dummy; + char *ptr; + for (int i=0; i<22; ++i) // parse past the values we don't want + { + ptr = NULL; + getdelim(&ptr, &dummy, ' ', fp); + free(ptr); + } + // 23rd space-delimited entry is vsize + ptr = NULL; + getdelim(&ptr, &dummy, ' ', fp); + llassert(ptr); + long long this_vm_size = atoll(ptr); + free(ptr); + // 24th space-delimited entry is RSS + ptr = NULL; + getdelim(&ptr, &dummy, ' ', fp); + llassert(ptr); + long long this_rss_size = getpagesize() * atoll(ptr); + free(ptr); + + llinfos << "VM SIZE IS NOW " << (this_vm_size/(1024*1024)) << " MB, RSS SIZE IS NOW " << (this_rss_size/(1024*1024)) << " MB" << llendl; + + if (llabs(last_vm_size - this_vm_size) > + significant_vm_difference) + { + if (this_vm_size > last_vm_size) + { + llwarns << "VM size grew by " << (this_vm_size - last_vm_size)/(1024*1024) << " MB in last frame" << llendl; + } + else + { + llinfos << "VM size shrank by " << (last_vm_size - this_vm_size)/(1024*1024) << " MB in last frame" << llendl; + } + } + + if (llabs(last_rss_size - this_rss_size) > + significant_rss_difference) + { + if (this_rss_size > last_rss_size) + { + llwarns << "RSS size grew by " << (this_rss_size - last_rss_size)/(1024*1024) << " MB in last frame" << llendl; + } + else + { + llinfos << "RSS size shrank by " << (last_rss_size - this_rss_size)/(1024*1024) << " MB in last frame" << llendl; + } + } + + last_rss_size = this_rss_size; + last_vm_size = this_vm_size; + + fclose(fp); + } +#endif // LL_LINUX +} + + // virtual void LLWindowSDL::processMiscNativeEvents() { #if LL_GTK // Pump GTK events to avoid starvation for: - // * Embedded Gecko // * DBUS servicing // * Anything else which quietly hooks into the default glib/GTK loop if (ll_try_gtk_init()) @@ -1628,6 +1698,12 @@ void LLWindowSDL::processMiscNativeEvents() setlocale(LC_ALL, saved_locale.c_str() ); } #endif // LL_GTK + + // hack - doesn't belong here - but this is just for debugging + if (getenv("LL_DEBUG_BLOAT")) + { + check_vm_bloat(); + } } void LLWindowSDL::gatherInput() diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index d5bc24149a..a04532376c 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -9,8 +9,8 @@ <menu_item_call label="Mein Profil" name="Profile"/> <menu_item_call label="Mein Aussehen" name="Appearance"/> <menu_item_check label="Mein Inventar" name="Inventory"/> - <menu_item_call label="Mein Inventar" name="ShowSidetrayInventory"/> - <menu_item_call label="Meine Gesten" name="Gestures"/> + <menu_item_check label="Mein Inventar" name="ShowSidetrayInventory"/> + <menu_item_check label="Meine Gesten" name="Gestures"/> <menu label="Mein Status" name="Status"> <menu_item_call label="Abwesend" name="Set Away"/> <menu_item_call label="Beschäftigt" name="Set Busy"/> @@ -24,7 +24,6 @@ <menu_item_call label="Meine Gruppen" name="My Groups"/> <menu_item_check label="Chat in der Nähe" name="Nearby Chat"/> <menu_item_call label="Leute in der Nähe" name="Active Speakers"/> - <menu_item_check label="Medien in der Nähe" name="Nearby Media"/> </menu> <menu label="Welt" name="World"> <menu_item_check label="Minikarte" name="Mini-Map"/> @@ -40,6 +39,10 @@ <menu label="Anzeigen" name="LandShow"> <menu_item_check label="Bewegungssteuerung" name="Movement Controls"/> <menu_item_check label="Ansichtsteuerung" name="Camera Controls"/> + <menu_item_check label="Bannlinien" name="Ban Lines"/> + <menu_item_check label="Strahlen" name="beacons"/> + <menu_item_check label="Grundstücksgrenzen" name="Property Lines"/> + <menu_item_check label="Landeigentümer" name="Land Owners"/> </menu> <menu_item_call label="Teleport nach Hause" name="Teleport Home"/> <menu_item_call label="Hier als Zuhause wählen" name="Set Home to Here"/> |