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
64 lines
2.3 KiB
C++
64 lines
2.3 KiB
C++
//===-- sanitizer_symbolizer_amdgpu.h -------------------------------------===//
|
|
//
|
|
// 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 SANITIZER_SYMBOLIZER_AMDGPU_H
|
|
#define SANITIZER_SYMBOLIZER_AMDGPU_H
|
|
|
|
#if SANITIZER_AMDGPU
|
|
# include "sanitizer_common.h"
|
|
# include "sanitizer_symbolizer_internal.h"
|
|
# if __has_include("amd_comgr.h.in")
|
|
# include "amd_comgr.h.in"
|
|
# elif __has_include("amd_comgr.h")
|
|
# include "amd_comgr.h"
|
|
# else
|
|
# error "No amd_comgr.h/amd_comgr header found!"
|
|
# endif
|
|
|
|
namespace __sanitizer {
|
|
|
|
struct COMgrFunctions {
|
|
bool inited_;
|
|
amd_comgr_status_t (*create_data)(amd_comgr_data_kind_t data_type,
|
|
amd_comgr_data_t *data_handle);
|
|
amd_comgr_status_t (*set_data)(amd_comgr_data_t data_handle, uint64_t size,
|
|
uint64_t offset);
|
|
amd_comgr_status_t (*set_data_from_file_slice)(amd_comgr_data_t data_handle,
|
|
int fd, uint64_t offset,
|
|
uint64_t size);
|
|
amd_comgr_status_t (*create_symbolizer)(
|
|
amd_comgr_data_t object_handle, void (*callback)(const char *, void *),
|
|
amd_comgr_symbolizer_info_t *symbolizer_object);
|
|
amd_comgr_status_t (*symbolize)(amd_comgr_symbolizer_info_t symbolizer_handle,
|
|
uint64_t addr, bool iscode, void *data);
|
|
amd_comgr_status_t (*destroy_symbolizer)(
|
|
amd_comgr_symbolizer_info_t symbolizer_handle);
|
|
amd_comgr_status_t (*release_data)(amd_comgr_data_t data_handle);
|
|
};
|
|
|
|
// Symbolizer for AMDGPU CodeObject.
|
|
class AMDGPUCodeObjectSymbolizer {
|
|
public:
|
|
AMDGPUCodeObjectSymbolizer() : object_cnt(comgr_objects::no_objs) {}
|
|
|
|
void Init(int fd, uint64_t offset, uint64_t size);
|
|
bool SymbolizePC(uptr addr, InternalScopedString &source_loc);
|
|
void Release();
|
|
|
|
private:
|
|
void InitCOMgr();
|
|
amd_comgr_data_t codeobject;
|
|
amd_comgr_symbolizer_info_t symbolizer;
|
|
enum comgr_objects { no_objs = 0, data = 1, data_and_symb = 2 } object_cnt;
|
|
bool init = false;
|
|
};
|
|
} // namespace __sanitizer
|
|
#endif
|
|
#endif // SANITIZER_SYMBOLIZER_AMDGPU_H
|