[compiler-rt] [compiler-rt][ctx_instr] Add `ctx_profile` component (PR #89304)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 11:35:42 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 {
----------------
david-xl wrote:
Same question here. Is it possible to use a common library for this (or make it part of a common library)?
https://github.com/llvm/llvm-project/pull/89304
More information about the llvm-commits
mailing list