summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-07 21:04:46 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-07 21:04:46 +0300
commit88ac2812b421f1eb5ab2af6fb793b23025da29a4 (patch)
treebcb2c7e6d61a91aeda14b7fa6424dfe1e50d5f83 /indra/llcommon/llsys.cpp
parente00edbeb4a7edfe4f190ac7bf2197aa8240e50c6 (diff)
parent4623b822386accfae5907c88099c2a88377a0271 (diff)
Merge branch 'master' into DRTVWR-522-maint
Diffstat (limited to 'indra/llcommon/llsys.cpp')
-rw-r--r--indra/llcommon/llsys.cpp63
1 files changed, 0 insertions, 63 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 079d297b80..2ca15a31c6 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -88,17 +88,6 @@ using namespace llsd;
# include <stdexcept>
const char MEMINFO_FILE[] = "/proc/meminfo";
# include <gnu/libc-version.h>
-#elif LL_SOLARIS
-# include <stdio.h>
-# include <unistd.h>
-# include <sys/utsname.h>
-# define _STRUCTURED_PROC 1
-# include <sys/procfs.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# include <errno.h>
-extern int errno;
#endif
LLCPUInfo gSysCPU;
@@ -511,8 +500,6 @@ const std::string& LLOSInfo::getOSVersionString() const
U32 LLOSInfo::getProcessVirtualSizeKB()
{
U32 virtual_size = 0;
-#if LL_WINDOWS
-#endif
#if LL_LINUX
# define STATUS_SIZE 2048
LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
@@ -532,24 +519,6 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
}
fclose(status_filep);
}
-#elif LL_SOLARIS
- char proc_ps[LL_MAX_PATH];
- sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
- LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
- return 0;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
- close(proc_fd);
- return 0;
- }
-
- close(proc_fd);
-
- virtual_size = proc_psinfo.pr_size;
#endif
return virtual_size;
}
@@ -558,8 +527,6 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
U32 LLOSInfo::getProcessResidentSizeKB()
{
U32 resident_size = 0;
-#if LL_WINDOWS
-#endif
#if LL_LINUX
LLFILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
if (status_filep != NULL)
@@ -578,24 +545,6 @@ U32 LLOSInfo::getProcessResidentSizeKB()
}
fclose(status_filep);
}
-#elif LL_SOLARIS
- char proc_ps[LL_MAX_PATH];
- sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid());
- int proc_fd = -1;
- if((proc_fd = open(proc_ps, O_RDONLY)) == -1){
- LL_WARNS() << "unable to open " << proc_ps << LL_ENDL;
- return 0;
- }
- psinfo_t proc_psinfo;
- if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){
- LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL;
- close(proc_fd);
- return 0;
- }
-
- close(proc_fd);
-
- resident_size = proc_psinfo.pr_rssize;
#endif
return resident_size;
}
@@ -740,11 +689,6 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
return U64Bytes(phys);
-#elif LL_SOLARIS
- U64 phys = 0;
- phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
- return U64Bytes(phys);
-
#else
return 0;
@@ -1033,13 +977,6 @@ LLSD LLMemoryInfo::loadStatsMap()
}
}
-#elif LL_SOLARIS
- U64 phys = 0;
-
- phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
-
- stats.add("Total Physical KB", phys);
-
#elif LL_LINUX
std::ifstream meminfo(MEMINFO_FILE);
if (meminfo.is_open())