From 9cc0510b4efe800bb5a2188001746d44979c494a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 26 Aug 2020 16:06:29 +0100 Subject: SL-13834 - add preferences info to ViewerStats, only when exiting and different from default --- indra/newview/llviewerstats.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f7ded00318..013757589c 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -60,6 +60,7 @@ #include "llviewernetwork.h" #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived #include "llsdserialize.h" +#include "llsdutil.h" #include "llcorehttputil.h" #include "llvoicevivox.h" @@ -425,7 +426,7 @@ void update_statistics() * If you move stats around here, make the corresponding changes in * those locations, too. */ -void send_stats() +void send_viewer_stats(bool include_preferences) { // IW 9/23/02 I elected not to move this into LLViewerStats // because it depends on too many viewer.cpp globals. @@ -617,10 +618,25 @@ void send_stats() body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames"); body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames"); - + + // Preferences + if (include_preferences) + { + bool diffs_only = true; // only log preferences that differ from default + body["preferences"]["settings"] = gSavedSettings.asLLSD(diffs_only); + body["preferences"]["settings_per_account"] = gSavedPerAccountSettings.asLLSD(diffs_only); + } + body["MinimalSkin"] = false; + LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL; + if (debugLoggingEnabled("LogViewerStatsPacket")) + { + std::string filename("viewer_stats_packet.xml"); + llofstream of(filename.c_str()); + LLSDSerialize::toPrettyXML(body,of); + } // The session ID token must never appear in logs body["session_id"] = gAgentSessionID; -- cgit v1.3 From d556a8a9741c367d8592cedbd2d8ef2255370a4c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 31 Aug 2020 20:51:40 +0100 Subject: SL-13834 - omit string-type controls from preference logs --- indra/llxml/llcontrol.cpp | 2 +- indra/newview/llviewerstats.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 00a6c08ba4..ead8634df4 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -649,7 +649,7 @@ LLSD LLControlGroup::asLLSD(bool diffs_only) iter != mNameTable.end(); iter++) { LLControlVariable *control = iter->second; - if (!control || (diffs_only && control->isDefault())) + if (!control || control->isType(TYPE_STRING) || (diffs_only && control->isDefault())) { continue; } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 013757589c..a1e3597ac0 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -622,7 +622,7 @@ void send_viewer_stats(bool include_preferences) // Preferences if (include_preferences) { - bool diffs_only = true; // only log preferences that differ from default + bool diffs_only = true; // only log preferences that differ from default? body["preferences"]["settings"] = gSavedSettings.asLLSD(diffs_only); body["preferences"]["settings_per_account"] = gSavedPerAccountSettings.asLLSD(diffs_only); } -- cgit v1.3 From c6ae8017da0cb433b24560c9a721ea25ea3396b7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 1 Sep 2020 15:14:49 +0100 Subject: SL-13834 - small correction --- indra/newview/llviewerstats.cpp | 2 +- indra/newview/llviewerstats.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a1e3597ac0..013757589c 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -622,7 +622,7 @@ void send_viewer_stats(bool include_preferences) // Preferences if (include_preferences) { - bool diffs_only = true; // only log preferences that differ from default? + bool diffs_only = true; // only log preferences that differ from default body["preferences"]["settings"] = gSavedSettings.asLLSD(diffs_only); body["preferences"]["settings_per_account"] = gSavedPerAccountSettings.asLLSD(diffs_only); } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index b120bb1cdd..04870e0c26 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -294,7 +294,7 @@ static const F32 SEND_STATS_PERIOD = 300.0f; // The following are from (older?) statistics code found in appviewer. void update_statistics(); -void send_viewer_stats(bool diffs_only); +void send_viewer_stats(bool include_preferences); extern LLFrameTimer gTextureTimer; extern U32Bytes gTotalTextureData; -- cgit v1.3 From 9d5c64dddc928fb5aa0cd03c4b3d68a1ea6173cf Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 10 Nov 2020 13:11:08 +0000 Subject: SL-14264 - ViewerStats added logging of most gGLManager fields --- indra/llrender/llgl.cpp | 74 +++++++++++++++++++++++++++++++++++++++++ indra/llrender/llgl.h | 2 ++ indra/newview/llviewerstats.cpp | 2 ++ 3 files changed, 78 insertions(+) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 498dfca1a3..d514b426ec 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -965,6 +965,80 @@ std::string LLGLManager::getRawGLString() return gl_string; } +void LLGLManager::asLLSD(LLSD& info) +{ + // Currently these are duplicates of fields in "system". + info["gpu_vendor"] = mGLVendorShort; + info["gpu_version"] = mDriverVersionVendorString; + info["opengl_version"] = mGLVersionString; + + info["vram"] = mVRAM; + + // Extensions used by everyone + info["has_multitexture"] = mHasMultitexture; + info["has_ati_mem_info"] = mHasATIMemInfo; + info["has_nvx_mem_info"] = mHasNVXMemInfo; + info["num_texture_units"] = mNumTextureUnits; + info["has_mip_map_generation"] = mHasMipMapGeneration; + info["has_compressed_textures"] = mHasCompressedTextures; + info["has_framebuffer_object"] = mHasFramebufferObject; + info["max_samples"] = mMaxSamples; + info["has_blend_func_separate"] = mHasBlendFuncSeparate; + + // ARB Extensions + info["has_vertex_buffer_object"] = mHasVertexBufferObject; + info["has_vertex_array_object"] = mHasVertexArrayObject; + info["has_sync"] = mHasSync; + info["has_map_buffer_range"] = mHasMapBufferRange; + info["has_flush_buffer_range"] = mHasFlushBufferRange; + info["has_pbuffer"] = mHasPBuffer; + info["has_shader_objects"] = mHasShaderObjects; + info["has_vertex_shader"] = mHasVertexShader; + info["has_fragment_shader"] = mHasFragmentShader; + info["num_texture_image_units"] = mNumTextureImageUnits; + info["has_occlusion_query"] = mHasOcclusionQuery; + info["has_timer_query"] = mHasTimerQuery; + info["has_occlusion_query2"] = mHasOcclusionQuery2; + info["has_point_parameters"] = mHasPointParameters; + info["has_draw_buffers"] = mHasDrawBuffers; + info["has_depth_clamp"] = mHasDepthClamp; + info["has_texture_rectangle"] = mHasTextureRectangle; + info["has_texture_multisample"] = mHasTextureMultisample; + info["has_transform_feedback"] = mHasTransformFeedback; + info["max_sample_mask_words"] = mMaxSampleMaskWords; + info["max_color_texture_samples"] = mMaxColorTextureSamples; + info["max_depth_texture_samples"] = mMaxDepthTextureSamples; + info["max_integer_samples"] = mMaxIntegerSamples; + + // Other extensions. + info["has_anisotropic"] = mHasAnisotropic; + info["has_arb_env_combine"] = mHasARBEnvCombine; + info["has_cube_map"] = mHasCubeMap; + info["has_debug_output"] = mHasDebugOutput; + info["has_srgb_texture"] = mHassRGBTexture; + info["has_srgb_framebuffer"] = mHassRGBFramebuffer; + info["has_texture_srgb_decode"] = mHasTexturesRGBDecode; + + // Vendor-specific extensions + info["is_ati"] = mIsATI; + info["is_nvidia"] = mIsNVIDIA; + info["is_intel"] = mIsIntel; + info["is_gf2or4mx"] = mIsGF2or4MX; + info["is_gf3"] = mIsGF3; + info["is_gf_gfx"] = mIsGFFX; + info["ati_offset_vertical_lines"] = mATIOffsetVerticalLines; + info["ati_old_driver"] = mATIOldDriver; + + // Other fields + info["has_requirements"] = mHasRequirements; + info["has_separate_specular_color"] = mHasSeparateSpecularColor; + info["debug_gpu"] = mDebugGPU; + info["max_vertex_range"] = mGLMaxVertexRange; + info["max_index_range"] = mGLMaxIndexRange; + info["max_texture_size"] = mGLMaxTextureSize; + info["gl_renderer"] = mGLRenderer; +} + void LLGLManager::shutdownGL() { if (mInited) diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 91ef4e9102..966c4b3c77 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -165,6 +165,8 @@ public: void printGLInfoString(); void getGLInfo(LLSD& info); + void asLLSD(LLSD& info); + // In ALL CAPS std::string mGLVendor; std::string mGLVendorShort; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 013757589c..7533c0c789 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -514,6 +514,8 @@ void send_viewer_stats(bool include_preferences) system["gpu_version"] = gGLManager.mDriverVersionVendorString; system["opengl_version"] = gGLManager.mGLVersionString; + gGLManager.asLLSD(system["gl"]); + S32 shader_level = 0; if (LLPipeline::sRenderDeferred) { -- cgit v1.3 From 4ba1ea1a651a5ecd11750090b7967356fa0b32d3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 15 Jan 2021 00:35:20 +0200 Subject: SL-14283 Don't crash viewer, only show a notification --- indra/newview/llappviewer.cpp | 62 +++++++++++++++++++++++------------------ indra/newview/llappviewer.h | 2 ++ indra/newview/llviewerstats.cpp | 1 + 3 files changed, 38 insertions(+), 27 deletions(-) (limited to 'indra/newview/llviewerstats.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d60c32755d..f518704e06 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -679,6 +679,7 @@ LLAppViewer::LLAppViewer() mPurgeCacheOnExit(false), mPurgeUserDataOnExit(false), mSecondInstance(false), + mUpdaterNotFound(false), mSavedFinalSnapshot(false), mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded. mQuitRequested(false), @@ -1163,7 +1164,7 @@ bool LLAppViewer::init() gGLActive = FALSE; -#if LL_RELEASE_FOR_DOWNLOAD +#if LL_RELEASE_FOR_DOWNLOAD if (!gSavedSettings.getBOOL("CmdLineSkipUpdater")) { LLProcess::Params updater; @@ -1199,6 +1200,7 @@ bool LLAppViewer::init() { // Run the updater. An exception from launching the updater should bother us. LLLeap::create(updater, true); + mUpdaterNotFound = false; } catch (...) { @@ -1208,8 +1210,7 @@ bool LLAppViewer::init() details.getString(), LLStringUtil::null, OSMB_OK); - // pass this exception to crash handler - throw; + mUpdaterNotFound = true; } } else @@ -1217,29 +1218,36 @@ bool LLAppViewer::init() LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL; } - // Iterate over --leap command-line options. But this is a bit tricky: if - // there's only one, it won't be an array at all. - LLSD LeapCommand(gSavedSettings.getLLSD("LeapCommand")); - LL_DEBUGS("InitInfo") << "LeapCommand: " << LeapCommand << LL_ENDL; - if (LeapCommand.isDefined() && ! LeapCommand.isArray()) - { - // If LeapCommand is actually a scalar value, make an array of it. - // Have to do it in two steps because LeapCommand.append(LeapCommand) - // trashes content! :-P - LLSD item(LeapCommand); - LeapCommand.append(item); - } - BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand)) - { - LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; - // We don't have any better description of this plugin than the - // user-specified command line. Passing "" causes LLLeap to derive a - // description from the command line itself. - // Suppress LLLeap::Error exception: trust LLLeap's own logging. We - // don't consider any one --leap command mission-critical, so if one - // fails, log it, shrug and carry on. - LLLeap::create("", leap, false); // exception=false - } + if (mUpdaterNotFound) + { + LL_WARNS("InitInfo") << "Failed to launch updater. Skipping Leap commands." << LL_ENDL; + } + else + { + // Iterate over --leap command-line options. But this is a bit tricky: if + // there's only one, it won't be an array at all. + LLSD LeapCommand(gSavedSettings.getLLSD("LeapCommand")); + LL_DEBUGS("InitInfo") << "LeapCommand: " << LeapCommand << LL_ENDL; + if (LeapCommand.isDefined() && !LeapCommand.isArray()) + { + // If LeapCommand is actually a scalar value, make an array of it. + // Have to do it in two steps because LeapCommand.append(LeapCommand) + // trashes content! :-P + LLSD item(LeapCommand); + LeapCommand.append(item); + } + BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand)) + { + LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; + // We don't have any better description of this plugin than the + // user-specified command line. Passing "" causes LLLeap to derive a + // description from the command line itself. + // Suppress LLLeap::Error exception: trust LLLeap's own logging. We + // don't consider any one --leap command mission-critical, so if one + // fails, log it, shrug and carry on. + LLLeap::create("", leap, false); // exception=false + } + } if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) { @@ -1247,7 +1255,7 @@ bool LLAppViewer::init() << "lleventhost no longer supported as a dynamic library" << LL_ENDL; } -#endif +#endif //LL_RELEASE_FOR_DOWNLOAD LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index eaebc896d0..5332fe2deb 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -95,6 +95,7 @@ public: bool quitRequested() { return mQuitRequested; } bool logoutRequestSent() { return mLogoutRequestSent; } bool isSecondInstance() { return mSecondInstance; } + bool isUpdaterMissing() { return mUpdaterNotFound; } void writeDebugInfo(bool isStatic=true); @@ -264,6 +265,7 @@ private: static LLAppViewer* sInstance; bool mSecondInstance; // Is this a second instance of the app? + bool mUpdaterNotFound; // True when attempt to start updater failed std::string mMarkerFileName; LLAPRFile mMarkerFile; // A file created to indicate the app is running. diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 7533c0c789..05f88b0a75 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -575,6 +575,7 @@ void send_viewer_stats(bool include_preferences) fail["failed_resends"] = (S32) gMessageSystem->mFailedResendPackets; fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets; fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets; + fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing(); body["stats"]["voice"] = LLVoiceVivoxStats::getInstance()->read(); -- cgit v1.3