SL-15832 Add OS bitness to ViewerStats
parent
59fc1ce288
commit
c82995f3e6
|
|
@ -474,6 +474,8 @@ LLOSInfo::LLOSInfo() :
|
|||
dotted_version_string << mMajorVer << "." << mMinorVer << "." << mBuild;
|
||||
mOSVersionString.append(dotted_version_string.str());
|
||||
|
||||
mOSBitness = is64Bit() ? 64 : 32;
|
||||
LL_INFOS("LLOSInfo") << "OS bitness: " << mOSBitness << LL_ENDL;
|
||||
}
|
||||
|
||||
#ifndef LL_WINDOWS
|
||||
|
|
@ -529,6 +531,11 @@ const std::string& LLOSInfo::getOSVersionString() const
|
|||
return mOSVersionString;
|
||||
}
|
||||
|
||||
const S32 LLOSInfo::getOSBitness() const
|
||||
{
|
||||
return mOSBitness;
|
||||
}
|
||||
|
||||
//static
|
||||
U32 LLOSInfo::getProcessVirtualSizeKB()
|
||||
{
|
||||
|
|
@ -582,6 +589,25 @@ U32 LLOSInfo::getProcessResidentSizeKB()
|
|||
return resident_size;
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLOSInfo::is64Bit()
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
#if defined(_WIN64)
|
||||
return true;
|
||||
#elif defined(_WIN32)
|
||||
// 32-bit viewer may be run on both 32-bit and 64-bit Windows, need to elaborate
|
||||
BOOL f64 = FALSE;
|
||||
return IsWow64Process(GetCurrentProcess(), &f64) && f64;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#else // ! LL_WINDOWS
|
||||
// we only build a 64-bit mac viewer and currently we don't build for linux at all
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
LLCPUInfo::LLCPUInfo()
|
||||
{
|
||||
std::ostringstream out;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public:
|
|||
const std::string& getOSStringSimple() const;
|
||||
|
||||
const std::string& getOSVersionString() const;
|
||||
|
||||
const S32 getOSBitness() const;
|
||||
|
||||
S32 mMajorVer;
|
||||
S32 mMinorVer;
|
||||
|
|
@ -59,6 +61,7 @@ public:
|
|||
#ifndef LL_WINDOWS
|
||||
static S32 getMaxOpenFiles();
|
||||
#endif
|
||||
static bool is64Bit();
|
||||
|
||||
static U32 getProcessVirtualSizeKB();
|
||||
static U32 getProcessResidentSizeKB();
|
||||
|
|
@ -66,6 +69,7 @@ private:
|
|||
std::string mOSString;
|
||||
std::string mOSStringSimple;
|
||||
std::string mOSVersionString;
|
||||
S32 mOSBitness;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -496,6 +496,7 @@ void send_viewer_stats(bool include_preferences)
|
|||
system["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
system["cpu"] = gSysCPU.getCPUString();
|
||||
system["address_size"] = ADDRESS_SIZE;
|
||||
system["os_bitness"] = LLOSInfo::instance().getOSBitness();
|
||||
unsigned char MACAddress[MAC_ADDRESS_BYTES];
|
||||
LLUUID::getNodeID(MACAddress);
|
||||
std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",
|
||||
|
|
|
|||
Loading…
Reference in New Issue