Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove print code #4

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions lib/Sys/Ebpf/Loader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ sub load_bpf_program {
warn "Log buffer content:\n", $attrs->{log_buf}, "\n";
die "BPF program load failed: $!\n";
}
print "BPF program loaded successfully with FD: $fd\n";

return $fd;
}

Expand Down Expand Up @@ -260,15 +258,11 @@ sub apply_map_relocations {
}
if ( defined $map_fd ) {

# # 指定されたオフセット位置にある `lddw` 命令(16バイト)を取得
# 指定されたオフセット位置にある `lddw` 命令(16バイト)を取得
my $bpf_insn
= substr( $self->{reader}->{raw_elf_data}, $r_offset, 16 )
; # 16バイトを取得
my $bpf_insn_len = length($bpf_insn);
print "Before relocation (offset $r_offset): "
. unpack( 'H*', $bpf_insn )
. "\n"; # デバッグ出力

my ( $high, $low )
= Sys::Ebpf::Asm::deserialize_128bit_instruction($bpf_insn);

Expand All @@ -288,12 +282,6 @@ sub apply_map_relocations {
# 書き換えた後の命令を出力
my $after_bpf_insn
= substr( $self->{reader}->{raw_elf_data}, $r_offset, 16 );
print "After relocation (offset $r_offset): "
. unpack( 'H*', $after_bpf_insn )
. "\n"; # デバッグ出力
}
else {
print "No matching map found for symbol: $sym_name\n";
}
}
}
Expand Down Expand Up @@ -323,7 +311,6 @@ sub load_bpf {
}

# リロケーションを適用
print ".rel" . $section_name . "\n";
my $reloc_section = $bpfelf->{relocations}{ ".rel" . $section_name };
my $prob_section
= find_symbol_table_from_name( $bpfelf->{sections}, $section_name );
Expand Down
Loading