[compiler-rt] [compiler-rt][ctx_instr] Add `ctx_profile` component (PR #89304)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 14:14:13 PDT 2024


================
@@ -0,0 +1,55 @@
+/*===- CtxInstrProfiling.h- Contextual instrumentation-based PGO  ---------===*\
+|*
+|* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+|* See https://llvm.org/LICENSE.txt for license information.
+|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+|*
+\*===----------------------------------------------------------------------===*/
+
+#ifndef CTX_PROFILE_CTXINSTRPROFILING_H_
+#define CTX_PROFILE_CTXINSTRPROFILING_H_
+
+#include <sanitizer/common_interface_defs.h>
+
+namespace __ctx_profile {
+
+/// Arena (bump allocator) forming a linked list. Intentionally not thread safe.
+/// Allocation and de-allocation happen using sanitizer APIs. We make that
+/// explicit.
+class Arena final {
----------------
vitalybuka wrote:

Oh, LowLevelAllocator does not release by design

https://github.com/llvm/llvm-project/pull/89304


More information about the llvm-commits mailing list