mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-12 15:48:45 +00:00
Define an error
This commit is contained in:
parent
2492ae1c3b
commit
284c52365b
@ -48,7 +48,7 @@ static __always_inline int golang_crypto_tls_write_uprobe(struct pt_regs *ctx) {
|
||||
event = bpf_map_lookup_elem(&golang_heap, &zero);
|
||||
|
||||
if (!event) {
|
||||
log_error(ctx, LOG_ERROR_ALLOCATING_CHUNK, pid, 0l, 0l);
|
||||
log_error(ctx, LOG_ERROR_GOLANG_ALLOCATING_EVENT, pid, 0l, 0l);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ static __always_inline int golang_crypto_tls_read_uprobe(struct pt_regs *ctx) {
|
||||
event = bpf_map_lookup_elem(&golang_heap, &zero);
|
||||
|
||||
if (!event) {
|
||||
log_error(ctx, LOG_ERROR_ALLOCATING_CHUNK, pid, 0l, 0l);
|
||||
log_error(ctx, LOG_ERROR_GOLANG_ALLOCATING_EVENT, pid, 0l, 0l);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ Copyright (C) UP9 Inc.
|
||||
#define LOG_ERROR_GOLANG_SOCKET_PUTTING_FILE_DESCRIPTOR (23)
|
||||
#define LOG_ERROR_GOLANG_DIAL_READING_KEY_DIAL (24)
|
||||
#define LOG_ERROR_GOLANG_DIAL_PUTTING_SOCKET (25)
|
||||
#define LOG_ERROR_GOLANG_ALLOCATING_EVENT (26)
|
||||
|
||||
// Sometimes we have the same error, happening from different locations.
|
||||
// in order to be able to distinct between them in the log, we add an
|
||||
|
@ -29,4 +29,5 @@ var bpfLogMessages = []string{
|
||||
/*0023*/ "[%d] Golang socket unable to put file descriptor [err: %d]",
|
||||
/*0024*/ "[%d] Golang dial unable to read key_dial [err: %d]",
|
||||
/*0025*/ "[%d] Golang dial unable to put socket [err: %d]",
|
||||
/*0026*/ "[%d] Unable to allocate Golang event in bpf heap",
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user