github-actions[bot] wrote: <!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning: <details> <summary> You can test this locally with the following command: </summary> ``````````bash git-clang-format --diff bbe97a86d8cc94b484420db54f735dac8bc818cf 7182baeef88e3d9448062118fd8af808a17fbcd9 --extensions cpp,h -- compiler-rt/lib/ctx_profile/CtxInstrContextNode.h compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp compiler-rt/lib/ctx_profile/CtxInstrProfiling.h compiler-rt/lib/ctx_profile/RootAutoDetector.cpp compiler-rt/lib/ctx_profile/RootAutoDetector.h compiler-rt/test/ctx_profile/TestCases/generate-context.cpp llvm/include/llvm/ProfileData/CtxInstrContextNode.h `````````` </details> <details> <summary> View the diff from clang-format here. </summary> ``````````diff diff --git a/compiler-rt/lib/ctx_profile/RootAutoDetector.cpp b/compiler-rt/lib/ctx_profile/RootAutoDetector.cpp index 5888545a79..50b8f07655 100644 --- a/compiler-rt/lib/ctx_profile/RootAutoDetector.cpp +++ b/compiler-rt/lib/ctx_profile/RootAutoDetector.cpp @@ -42,7 +42,7 @@ void RootAutoDetector::start() { +[](void *Ctx) -> void * { RootAutoDetector *RAD = reinterpret_cast<RootAutoDetector *>(Ctx); SleepForSeconds(30); - Vector<PerThreadSamples*> Copy; + Vector<PerThreadSamples *> Copy; { GenericScopedLock<SpinMutex> M(&RAD->AllSamplesMutex); Copy.Resize(RAD->AllSamples.Size()); @@ -72,9 +72,7 @@ void RootAutoDetector::start() { this); } -void RootAutoDetector::join() { - pthread_join(WorkerThread, nullptr); -} +void RootAutoDetector::join() { pthread_join(WorkerThread, nullptr); } void RootAutoDetector::sample() { static thread_local bool Entered = false; @@ -90,7 +88,8 @@ void RootAutoDetector::collectStack() { GET_CALLER_PC_BP; BufferedStackTrace CurrentStack; CurrentStack.Unwind(pc, bp, nullptr, false); - if (CurrentStack.size <= 2) return; + if (CurrentStack.size <= 2) + return; static thread_local PerThreadSamples *ThisThreadSamples = new (__sanitizer::InternalAlloc(sizeof(PerThreadSamples))) PerThreadSamples(*this); diff --git a/compiler-rt/lib/ctx_profile/RootAutoDetector.h b/compiler-rt/lib/ctx_profile/RootAutoDetector.h index 254a40b163..f5cecad2f3 100644 --- a/compiler-rt/lib/ctx_profile/RootAutoDetector.h +++ b/compiler-rt/lib/ctx_profile/RootAutoDetector.h @@ -78,7 +78,7 @@ class RootAutoDetector final { }; SpinMutex AllSamplesMutex; SANITIZER_GUARDED_BY(AllSamplesMutex) - Vector<PerThreadSamples*> AllSamples; + Vector<PerThreadSamples *> AllSamples; atomic_uintptr_t &FunctionDataListHead; atomic_uintptr_t &Self; void collectStack(); `````````` </details> https://github.com/llvm/llvm-project/pull/133147 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits