Commit Graph

103 Commits (a455d3ee7d5ddefcdf008fa86ecc7c80aba758aa)

Author SHA1 Message Date
Brad Linden 367c8f2363
Improve safety of macOS available RAM calcuations at suggestion of Ansariel and Beq (#2423) 2024-08-26 17:24:07 -07:00
Rye Mutt 2a7030992f
Update tracy profiler to 0.10 (#1946) 2024-07-09 16:53:43 -05:00
Dave Parks e6e41e71b7
#1943 make sys free in texture console llmemorysavailphysicalmeminkb tell the truth (#1966)
* Also fix for crash when applying MoaP to PBR material
2024-07-09 15:54:18 -05:00
Brad Linden 7322623a6f Fix pre-commit whitespace checks and merge PR secondlife/viewer#1874 2024-06-28 12:44:41 -07:00
Beq c2fbd139c1 realign system ram functions
make the system ram function align across all supported platforms.
Taken from 3b074ba4af
+ clean up FS specific comment markers and upstream code retention
2024-06-28 15:55:11 +01:00
Ansariel e2e37cced8 Fix line endlings 2024-05-22 22:40:26 +03:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Andrey Lihatskiy 85f2447b3d Merge branch 'main' into marchcat/a-merge
# Conflicts:
#	autobuild.xml
#	indra/llimage/llimage.cpp
#	indra/llui/llsearcheditor.cpp
#	indra/llui/llview.cpp
#	indra/newview/llagent.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloatercamera.cpp
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitslist.cpp
#	indra/newview/llpanelgroupbulkban.cpp
#	indra/newview/llsidepanelappearance.cpp
#	indra/newview/llvovolume.cpp
2024-04-24 19:28:15 +03:00
Lars Næsbye Christensen ba4e7b989b llcommon: BOOL (int) to real bool/LSTATUS 2024-02-09 01:02:29 +02:00
Andrey Lihatskiy c409236dac Merge branch 'DRTVWR-594-maint-Y' into marchcat/594-y-pbr-merge
# Conflicts:
#	indra/newview/llinventorygallery.cpp
#	indra/newview/skins/default/xui/en/notifications.xml
2023-11-30 18:09:29 +02:00
Miezhiko 9bd1ef1cf8 llmemory: use getrusage for getCurrentRSS on linux 2023-11-20 18:30:32 +02:00
Andrey Kleshchev 24fb2f8336 Merge branch 'master' (DRTVWR-548) into DRTVWR-559
# Conflicts:
#	indra/llrender/llgl.cpp
#	indra/llrender/llrendertarget.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llviewercontrol.cpp
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
2022-10-21 18:19:27 +03:00
Howard Stearns 33fe18c335 SL-17485-b - Attempt to make teamcity builds happy by not referencing a newview global from an llcommon file. 2022-06-17 16:29:39 -07:00
Howard Stearns bdd76a6a1d SL-17485 - Provide corrected missing memory data on mac: sAllocatedPageSizeInKB, sAllocatedMemInKB, sAvailPhysicalMemInKB, sMaxPhysicalMemInKB 2022-06-13 13:59:07 -07:00
Howard Stearns 266568bf6f Merged in SL-15937 (pull request #991)
SL-15937 - adjust memory limit / cache code

Approved-by: Andrey Lihatskiy
Approved-by: Vir Linden
2022-05-27 20:29:56 +00:00
Howard Stearns 8ef25a63bd SL-15937 - adjust memory limit / cache code 2022-05-23 19:49:18 -07:00
Dave Parks 675514bdb3 SL-16093 Don't force the console window to be open on developer builds because it causes frame stalls while logging. 2021-09-27 23:56:06 +00:00
Dave Houlton d12305496f DRTVWR-510 clean up obsolete downstream-from-mDebugGPU code 2020-10-19 17:21:56 -06:00
Dave Houlton 7cd076c796 DRTVWR-510 remove all LL_SOLARIS conditionals 2020-10-08 17:16:22 -06:00
Graham Linden 7136956b90 Use more typedefs to simplify sync between viewer and sim env settings code. 2018-06-02 23:28:48 +01:00
Andrey Kleshchev 6e445e82e2 MAINT-8091 Removed deprecated and unused private memory pooling 2018-01-30 14:03:26 +00:00
Nat Goodspeed 9fa131b088 DRTVWR-418, MAINT-6996: Update Mac mem queries (per Drake Arconis)
Drake points out that the OS X 64-bit-capable memory-query APIs recommended in
comments by some long-ago maintainer are by now themselves obsolete. He
offered this patch to update us to current macOS memory APIs.
2017-05-10 14:19:44 -04:00
Nat Goodspeed 49cfd6d991 DRTVWR-418, MAINT-6996: On Mac, obtain total mem, not resident mem.
The LLMemory method getCurrentRSS() is defined to return the "resident set
size," but in fact on Windows it returns the WorkingSetSize -- and that's
actually what callers want from it: the total memory consumed by the
application for statistics purposes. It's not really clear what users gain by
knowing how much of that is resident in real memory, versus the total
consumption. So despite the commentation and the method name itself, on Mac
make it return the virtual size consumed.
2017-05-04 18:13:56 -04:00
Nat Goodspeed 2bb19aec98 DRTVWR-418, MAINT-6996: Update Mac LLMemory::getCurrentRSS().
Evidently the Mac implementation of LLMemory::getCurrentRSS() goes back to
OS X 10.3, because there was a helpful comment of the form:

------
The API used here is not capable of dealing with 64-bit memory sizes, but is
available before 10.4.

Once we start requiring 10.4, we can use the updated API, which looks like
this:

[new current implementation]

Of course, this doesn't gain us anything unless we start building the viewer
as a 64-bit executable, since that's the only way for our memory allocation to
exceed 2^32.
------

Hey, guess what, we're building 64-bit viewers now!

Thank you, whoever thoughtfully noted that, both for calling out the issue and
sparing us the research. (The comment goes back to Subversion days, so hg
blame shows only the merge-to-release changeset.)
2017-05-02 11:05:13 -04:00
Nat Goodspeed 52899ed62a DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support.
There were two distinct LLMemory methods getCurrentRSS() and
getWorkingSetSize(). It was pointless to have both: on Windows they were
completely redundant; on other platforms getWorkingSetSize() always returned
0. (Amusingly, though the Windows implementations both made exactly the same
GetProcessMemoryInfo() call and used exactly the same logic, the code was
different in the two -- as though the second was implemented without awareness
of the first, even though they were adjacent in the source file.)

One of the actual MAINT-6996 problems was due to the fact that
getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other
words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change
its one call to getCurrentRSS() instead.

The other culprit was that in several places, the 64-bit WorkingSetSize
returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS())
was explicitly cast to a 32-bit data type. That works only when explicitly or
implicitly (using LLUnits type conversion) scaling the value to kilobytes or
megabytes. When the size in bytes is desired, use 64-bit types instead.

In addition to the symptoms, LLMemory was overdue for a bit of cleanup.

There was a 16K block of memory called reserveMem, the comment on which read:
"reserve 16K for out of memory error handling." Yet *nothing* was ever done
with that block! If it were going to be useful, one would think someone would
at some point explicitly free the block. In fact there was a method
freeReserve(), apparently for just that purpose -- which was never called. As
things stood, reserveMem served only to *prevent* the viewer from ever using
that chunk of memory. Remove reserveMem and the unused freeReserve().

The only function of initClass() and cleanupClass() was to allocate and free
reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them.

In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped()
method that returned U32Bytes. Its job was simply to return a size in bytes
that could fit into a U32 data type, returning U32_MAX if the 64-bit value
exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB()
(which getPhysicalMemoryClamped() used internally anyway). We no longer care
about any platform that cannot handle 64-bit data types.
2017-05-02 10:51:18 -04:00
Nat Goodspeed 40f7501319 DRTVWR-418: Use uintptr_t when casting pointers to ints.
LLPrivateMemoryPool and LLPrivateMemoryPoolManager have assumed that it's
always valid to cast a pointer to U32. With 64-bit pointers, no longer true.
2016-11-22 08:35:41 -05:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
ruslantproductengine 75ffe90b0c MAINT-5042 FIXED SL Viewer Closes Unexpectedly in specific area with high RenderVolumeLODFactor
- fix for review
- fix in buffer overrun detector
2015-04-27 18:21:39 +03:00
ruslantproductengine edb7e3450f MAINT-4435 FIXED build fix patchset2 2014-10-28 17:12:49 +02:00
ruslantproductengine 366bcd0cbc MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices
less than allowed. Changes in all other files relate auxiliary methods for
catching similar bugs in future.
2014-10-27 17:10:08 +02:00
Richard Linden 3fd68662f2 added memory usage and occlusion events to traces
renamed "current" to "primary" when referring to accumulators
2013-09-07 21:16:39 -07:00
Richard Linden 8535b87544 removed some unecessary template parameters from LLUnit member functions
forced unit conversion code to inline
unit conversion now no longer converts all the way to base and back, but tries
to find equivalent units as early as possible
fixed another llinfos instance
scene monitor now outputs n/a for invalid samples
2013-08-26 18:00:24 -07:00
Richard Linden 2c6bc5afa5 SH-4433 WIP Interesting: Statistics > Ping Sim is always 0 ms
made getPrimaryAccumulator return a reference since it was an
always non-null pointer
changed unit conversion to perform lazy division in order to avoid truncation
of timer values
2013-08-21 14:06:57 -07:00
Richard Linden 6d9af37406 BUILDFIX: unit assignment error 2013-08-20 12:10:05 -07:00
Richard Linden 612892b45a SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms
continued conversion to units system
made units perform type promotion correctly and preserve type in arithmetic
e.g. can now do LLVector3 in units
added typedefs for remaining common unit types, including implicits
2013-08-18 22:30:27 -07:00
Richard Linden 25937040de SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms
converted many values over to units system in effort to track down
source of 0 ping
2013-08-16 12:38:12 -07:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Richard Linden d122318bef SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console
added percentage/ratio units
added auto-range and auto tick calculation to stat bar to automate display stats
2013-07-08 00:55:17 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Richard Linden c0224cc47a merge with viewer-development 2012-11-19 19:06:36 -08:00
Richard Linden 9d77e030d9 SH-3406 WIP convert fast timers to lltrace system
cleaning up build
moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc
streamlined Time class and consolidated functionality in BlockTimer class
llfasttimer is no longer included via llstring.h, so had to add it manually in several places
2012-11-14 23:52:27 -08:00
William Todd Stinson e1bc3cb096 MAINT-1684: Correcting the calls to ll_aligned_free() which should have actually been to ll_aligned_free_16(). 2012-10-11 18:25:13 -07:00
William Todd Stinson 572d4bc071 MAINT-1684: Attempt at correcting the linux crash on startup. Replacing the memory allocations and frees in the LLPrivateMemoryPool with aligned memory allocations and frees. 2012-10-11 16:47:16 -07:00
Oz Linden 97d969a338 initial attempt to restore changes that make removing tcmalloc possible; not tested 2012-09-12 14:36:37 -04:00
William Todd Stinson a766e26db4 Backing out the changes contributing to DRTVWR-167 and DRTVWR-179 from the repository. 2012-09-10 10:37:02 -07:00
simon@Simon-PC.lindenlab.com 173d0fa213 Pull in viewer-development because it's painful. Merge with runitai's help. 2012-07-11 16:15:23 -07:00
Brad Payne (Vir Linden) 1435a8b9e6 SH-2789 WIP - stricter calling of memcpyNonAliased16 2012-01-04 15:21:23 -05:00
Brad Payne (Vir Linden) 9c2e0d84f8 SH-2789 WIP - various fixes to force 16-byte alignment 2011-12-19 18:17:18 -05:00