Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion indra/cmake/Linking.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ elseif (WINDOWS)
ole32
dbghelp
rpcrt4.lib
legacy_stdio_definitions
)
else()
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
Expand Down
7 changes: 4 additions & 3 deletions indra/cmake/Tracy.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# -*- cmake -*-
include_guard()
include(Prebuilt)
include(Variables)

include_guard()
add_library( ll::tracy INTERFACE IMPORTED )

# default Tracy profiling on for test builds, but off for all others
string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
if(channel_lower MATCHES "^second life test")
option(USE_TRACY "Use Tracy profiler." ON)
else()
option(USE_TRACY "Use Tracy profiler." OFF)
option(USE_TRACY "Use Tracy profiler." OFF)
endif()

if (USE_TRACY)
Expand Down Expand Up @@ -37,6 +38,6 @@ if (USE_TRACY)
endif ()

# See: indra/llcommon/llprofiler.h
add_compile_definitions(LL_PROFILER_CONFIGURATION=3)
add_compile_definitions(LL_PROFILER_CONFIGURATION=1)
endif (USE_TRACY)

105 changes: 0 additions & 105 deletions indra/integration_tests/llimage_libtest/llimage_libtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
#include "v4coloru.h"
#include "llsdserialize.h"
#include "llcleanup.h"
#include "lltrace.h"
#include "llfasttimer.h"

// system libraries
#include <iostream>
Expand Down Expand Up @@ -91,19 +89,10 @@ static const char USAGE[] = "\n"
" Only valid for output j2c images.\n"
" -f, --filter <file>\n"
" Apply the filter <file> to the input images.\n"
" -log, --logmetrics <metric>\n"
" Log performance data for <metric>. Results in <metric>.slp\n"
" Note: so far, only ImageCompressionTester has been tested.\n"
" -a, --analyzeperformance\n"
" Create a report comparing <metric>_baseline.slp with current <metric>.slp\n"
" Results in <metric>_report.csv\n"
" -s, --image-stats\n"
" Output stats for each input and output image.\n"
"\n";

// true when all image loading is done. Used by metric logging thread to know when to stop the thread.
static bool sAllDone = false;

// Create an empty formatted image instance of the correct type from the filename
LLPointer<LLImageFormatted> create_image(const std::string &filename)
{
Expand Down Expand Up @@ -315,34 +304,6 @@ void store_output_file(std::list<std::string> &output_filenames, std::list<std::
}
}

// Holds the metric gathering output in a thread safe way
class LogThread : public LLThread
{
public:
std::string mFile;

LogThread(std::string& test_name) : LLThread("llimage_libtest log")
{
std::string file_name = test_name + std::string(".slp");
mFile = file_name;
}

void run()
{
llofstream os(mFile.c_str());

while (!sAllDone)
{
LLFastTimer::writeLog(os);
os.flush();
ms_sleep(32);
}
LLFastTimer::writeLog(os);
os.flush();
os.close();
}
};

int main(int argc, char** argv)
{
// Call Tracy first thing to have it allocate memory
Expand All @@ -354,7 +315,6 @@ int main(int argc, char** argv)
std::list<std::string> input_filenames;
std::list<std::string> output_filenames;
// Other optional parsed arguments
bool analyze_performance = false;
bool image_stats = false;
int* region = NULL;
int discard_level = -1;
Expand All @@ -368,7 +328,6 @@ int main(int argc, char** argv)
// Init whatever is necessary
ll_init_apr();
LLImage::initClass();
LogThread* fast_timer_log_thread = NULL; // For performance and metric gathering

// Analyze command line arguments
for (int arg = 1; arg < argc; ++arg)
Expand Down Expand Up @@ -514,29 +473,6 @@ int main(int argc, char** argv)
{
reversible = true;
}
else if (!strcmp(argv[arg], "--logmetrics") || !strcmp(argv[arg], "-log"))
{
// '--logmetrics' needs to be specified with a named test metric argument
// Note: for the moment, only ImageCompressionTester has been tested
std::string test_name;
if ((arg + 1) < argc)
{
test_name = argv[arg+1];
}
if (((arg + 1) >= argc) || (test_name[0] == '-'))
{
// We don't have an argument left in the arg list or the next argument is another option
std::cout << "No --logmetrics argument given, no perf data will be gathered" << std::endl;
}
else
{
LLFastTimer::sMetricLog = TRUE;
LLFastTimer::sLogName = test_name;
arg += 1; // Skip that arg now we know it's a valid test name
if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list
break;
}
}
else if (!strcmp(argv[arg], "--filter") || !strcmp(argv[arg], "-f"))
{
// '--filter' needs to be specified with a named filter argument
Expand All @@ -556,10 +492,6 @@ int main(int argc, char** argv)
break;
}
}
else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a"))
{
analyze_performance = true;
}
else if (!strcmp(argv[arg], "--image-stats") || !strcmp(argv[arg], "-s"))
{
image_stats = true;
Expand All @@ -572,20 +504,6 @@ int main(int argc, char** argv)
std::cout << "No input file, nothing to do -> exit" << std::endl;
return 0;
}
if (analyze_performance && !LLFastTimer::sMetricLog)
{
std::cout << "Cannot create perf report if no perf gathered (i.e. use argument -log <perf> with -a) -> exit" << std::endl;
return 0;
}


// Create the logging thread if required
if (LLTrace::BlockTimer::sMetricLog)
{
LLTrace::BlockTimer::setLogLock(new LLMutex());
fast_timer_log_thread = new LogThread(LLTrace::BlockTimer::sLogName);
fast_timer_log_thread->start();
}

// Load the filter once and for all
LLImageFilter filter(filter_name);
Expand Down Expand Up @@ -622,31 +540,8 @@ int main(int argc, char** argv)
}
}

// Output perf data if requested by user
if (analyze_performance)
{
std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";

std::cout << "Analyzing performance, check report in : " << report_name << std::endl;

LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline_name, current_name, report_name);
}

// Stop the perf gathering system if needed
if (LLTrace::BlockTimer::sMetricLog)
{
LLMetricPerformanceTesterBasic::deleteTester(LLTrace::BlockTimer::sLogName);
sAllDone = true;
}

// Cleanup and exit
SUBSYSTEM_CLEANUP(LLImage);
if (fast_timer_log_thread)
{
fast_timer_log_thread->shutdown();
}

return 0;
}
2 changes: 1 addition & 1 deletion indra/llappearance/llavatarappearance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ void LLAvatarAppearance::buildCharacter()

bool LLAvatarAppearance::loadAvatar()
{
// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR);
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;

// avatar_skeleton.xml
if( !buildSkeleton(sAvatarSkeletonInfo) )
Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/llavatarjointmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
// Header Files
//-----------------------------------------------------------------------------
#include "linden_common.h"
#include "llfasttimer.h"
#include "llrender.h"

#include "llavatarjointmesh.h"
Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/llpolymesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
//-----------------------------------------------------------------------------
#include "linden_common.h"
#include "llpolymesh.h"
#include "llfasttimer.h"
#include "llmemory.h"

//#include "llviewercontrol.h"
Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/llpolymorph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "llxmltree.h"
#include "llendianswizzle.h"
#include "llpolymesh.h"
#include "llfasttimer.h"

//#include "../tools/imdebug/imdebug.h"

Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/llpolyskeletaldistortion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "llavatarjoint.h"
#include "llpolymorph.h"
#include "llwearable.h"
#include "llfasttimer.h"

#include "llpolyskeletaldistortion.h"

Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/lltexlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "llwearabledata.h"
#include "llvertexbuffer.h"
#include "llviewervisualparam.h"
#include "llfasttimer.h"

//#include "../tools/imdebug/imdebug.h"

Expand Down
1 change: 0 additions & 1 deletion indra/llappearance/lltexlayerparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "lltexturemanagerbridge.h"
#include "../llui/llui.h"
#include "llwearable.h"
#include "llfasttimer.h"

//-----------------------------------------------------------------------------
// LLTexLayerParam
Expand Down
Loading