|
5 | 5 | #include "frida-gum.h" |
6 | 6 |
|
7 | 7 | #include "nvPTXCompiler.h" |
8 | | -#include <bpftime_shm_internal.hpp> |
9 | | -#include "bpf_map/gpu/nv_gpu_ringbuf_map.hpp" |
10 | 8 | #include "nv_attach_private_data.hpp" |
11 | 9 | #include "nv_attach_utils.hpp" |
12 | 10 | #include "spdlog/spdlog.h" |
@@ -135,7 +133,6 @@ int nv_attach_impl::create_attach_with_ebpf_callback( |
135 | 133 |
|
136 | 134 | hook_entries[id] = std::move(entry); |
137 | 135 | this->map_basic_info = data.map_basic_info; |
138 | | - this->rebase_gpu_ringbuf_map_buffers(); |
139 | 136 | this->shared_mem_ptr = data.comm_shared_mem; |
140 | 137 | SPDLOG_INFO("Recorded pass {} for func {}", |
141 | 138 | matched->executable_path.c_str(), func_name); |
@@ -676,47 +673,8 @@ int nv_attach_impl::run_attach_entry_on_gpu(int attach_id, int run_count, |
676 | 673 |
|
677 | 674 | void nv_attach_impl::rebase_gpu_ringbuf_map_buffers() |
678 | 675 | { |
679 | | - if (!this->map_basic_info.has_value()) |
680 | | - return; |
681 | | - auto manager = shm_holder.global_shared_memory.get_manager(); |
682 | | - if (!manager) { |
683 | | - SPDLOG_WARN( |
684 | | - "Unable to rebase GPU ringbuf pointers: handler manager missing"); |
685 | | - return; |
686 | | - } |
687 | | - auto &infos = *this->map_basic_info; |
688 | | - const size_t limit = std::min(infos.size(), manager->size()); |
689 | | - for (size_t fd = 0; fd < limit; ++fd) { |
690 | | - auto &info = infos[fd]; |
691 | | - if (!info.enabled || |
692 | | - info.map_type != |
693 | | - (int)bpf_map_type::BPF_MAP_TYPE_GPU_RINGBUF_MAP) |
694 | | - continue; |
695 | | - if (!manager->is_allocated(fd)) |
696 | | - continue; |
697 | | - const auto &handler_variant = manager->get_handler(fd); |
698 | | - if (!std::holds_alternative<bpf_map_handler>(handler_variant)) { |
699 | | - SPDLOG_WARN( |
700 | | - "Map info entry {} expected map handler but found different type", |
701 | | - fd); |
702 | | - continue; |
703 | | - } |
704 | | - const auto &handler = |
705 | | - std::get<bpf_map_handler>(handler_variant); |
706 | | - auto impl_opt = handler.try_get_nv_gpu_ringbuf_map_impl(); |
707 | | - if (!impl_opt) { |
708 | | - SPDLOG_WARN( |
709 | | - "Failed to obtain nv_gpu_ringbuf_map_impl for fd {} while rebasing pointers", |
710 | | - fd); |
711 | | - continue; |
712 | | - } |
713 | | - auto buffer_ptr = reinterpret_cast<void *>( |
714 | | - static_cast<uintptr_t>(impl_opt.value()->get_gpu_mem_buffer())); |
715 | | - info.extra_buffer = buffer_ptr; |
716 | | - SPDLOG_DEBUG( |
717 | | - "Rebased GPU ringbuf map fd {} extra_buffer to {:x}", |
718 | | - fd, (uintptr_t)buffer_ptr); |
719 | | - } |
| 676 | + SPDLOG_DEBUG( |
| 677 | + "nv_attach_impl::rebase_gpu_ringbuf_map_buffers is a no-op (legacy placeholder)"); |
720 | 678 | } |
721 | 679 |
|
722 | 680 | void nv_attach_impl::mirror_cuda_memcpy_to_symbol( |
|
0 commit comments