CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
89 lines
3.1 KiB
C
89 lines
3.1 KiB
C
/*===---- instr_prof_interface.h - Instrumentation PGO User Program API ----===
|
|
*
|
|
* 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
|
|
*
|
|
*===-----------------------------------------------------------------------===
|
|
*
|
|
* This header provides a public interface for fine-grained control of counter
|
|
* reset and profile dumping. These interface functions can be directly called
|
|
* in user programs.
|
|
*
|
|
\*===---------------------------------------------------------------------===*/
|
|
|
|
#ifndef COMPILER_RT_INSTR_PROFILING
|
|
#define COMPILER_RT_INSTR_PROFILING
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __LLVM_INSTR_PROFILE_GENERATE
|
|
// Profile file reset and dump interfaces.
|
|
// When `-fprofile[-instr]-generate`/`-fcs-profile-generate` is in effect,
|
|
// clang defines __LLVM_INSTR_PROFILE_GENERATE to pick up the API calls.
|
|
|
|
/*!
|
|
* \brief Set the filename for writing instrumentation data.
|
|
*
|
|
* Sets the filename to be used for subsequent calls to
|
|
* \a __llvm_profile_write_file().
|
|
*
|
|
* \c Name is not copied, so it must remain valid. Passing NULL resets the
|
|
* filename logic to the default behaviour.
|
|
*
|
|
* Note: There may be multiple copies of the profile runtime (one for each
|
|
* instrumented image/DSO). This API only modifies the filename within the
|
|
* copy of the runtime available to the calling image.
|
|
*
|
|
* Warning: This is a no-op if continuous mode (\ref
|
|
* __llvm_profile_is_continuous_mode_enabled) is on. The reason for this is
|
|
* that in continuous mode, profile counters are mmap()'d to the profile at
|
|
* program initialization time. Support for transferring the mmap'd profile
|
|
* counts to a new file has not been implemented.
|
|
*/
|
|
void __llvm_profile_set_filename(const char *Name);
|
|
|
|
/*!
|
|
* \brief Interface to set all PGO counters to zero for the current process.
|
|
*
|
|
*/
|
|
void __llvm_profile_reset_counters(void);
|
|
|
|
/*!
|
|
* \brief this is a wrapper interface to \c __llvm_profile_write_file.
|
|
* After this interface is invoked, an already dumped flag will be set
|
|
* so that profile won't be dumped again during program exit.
|
|
* Invocation of interface __llvm_profile_reset_counters will clear
|
|
* the flag. This interface is designed to be used to collect profile
|
|
* data from user selected hot regions. The use model is
|
|
* __llvm_profile_reset_counters();
|
|
* ... hot region 1
|
|
* __llvm_profile_dump();
|
|
* .. some other code
|
|
* __llvm_profile_reset_counters();
|
|
* ... hot region 2
|
|
* __llvm_profile_dump();
|
|
*
|
|
* It is expected that on-line profile merging is on with \c %m specifier
|
|
* used in profile filename . If merging is not turned on, user is expected
|
|
* to invoke __llvm_profile_set_filename to specify different profile names
|
|
* for different regions before dumping to avoid profile write clobbering.
|
|
*/
|
|
int __llvm_profile_dump(void);
|
|
|
|
#else
|
|
|
|
#define __llvm_profile_set_filename(Name)
|
|
#define __llvm_profile_reset_counters()
|
|
#define __llvm_profile_dump() (0)
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif
|