diff --git a/selfdrive/debug/profiling/clpeak/build.sh b/selfdrive/debug/profiling/clpeak/build.sh index a2413a8e34..1dcb05cbbc 100755 --- a/selfdrive/debug/profiling/clpeak/build.sh +++ b/selfdrive/debug/profiling/clpeak/build.sh @@ -5,15 +5,18 @@ cd $DIR if [ ! -d "$DIR/clpeak" ]; then git clone https://github.com/krrishnarraj/clpeak.git + + cd clpeak + git fetch + git checkout ec2d3e70e1abc7738b81f9277c7af79d89b2133b + git reset --hard origin/master + git submodule update --init --recursive --remote + + git apply ../run_continuously.patch fi cd clpeak -git fetch -git checkout master -git reset --hard origin/master -git submodule update --init --recursive --remote - -mkdir build +mkdir build || true cd build cmake .. cmake --build . diff --git a/selfdrive/debug/profiling/clpeak/run_continuously.patch b/selfdrive/debug/profiling/clpeak/run_continuously.patch new file mode 100644 index 0000000000..075c65bd2a --- /dev/null +++ b/selfdrive/debug/profiling/clpeak/run_continuously.patch @@ -0,0 +1,13 @@ +diff --git a/src/clpeak.cpp b/src/clpeak.cpp +index 8cb192b..b6fe6f5 100644 +--- a/src/clpeak.cpp ++++ b/src/clpeak.cpp +@@ -47,7 +47,7 @@ int clPeak::runAll() + + log->xmlOpenTag("clpeak"); + log->xmlAppendAttribs("os", OS_NAME); +- for (size_t p = 0; p < platforms.size(); p++) ++ for (size_t p = 0; p < platforms.size(); (p+1 % platforms.size())) + { + if (forcePlatform && (p != specifiedPlatform)) + continue;