From 79d6d2b7f9566538189380674076524d63fa3350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Tudur=C3=AD?= Date: Mon, 30 Sep 2024 14:12:16 +0200 Subject: [PATCH] Use struct with pid and Go routine addr for Go BPF maps (#1201) --- bpf/go_common.h | 36 +++---- bpf/go_grpc.h | 67 +++++++------ bpf/go_kafka_go.h | 69 +++++++------ bpf/go_nethttp.h | 98 ++++++++++--------- bpf/go_redis.h | 30 +++--- bpf/go_runtime.h | 14 +-- bpf/go_sarama.h | 25 ++--- bpf/go_sql.h | 10 +- pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go | 4 +- pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o | 4 +- .../ebpf/gotracer/bpf_debug_arm64_bpfel.go | 4 +- .../ebpf/gotracer/bpf_debug_arm64_bpfel.o | 4 +- .../ebpf/gotracer/bpf_debug_x86_bpfel.go | 4 +- .../ebpf/gotracer/bpf_debug_x86_bpfel.o | 4 +- .../ebpf/gotracer/bpf_tp_arm64_bpfel.go | 4 +- .../ebpf/gotracer/bpf_tp_arm64_bpfel.o | 4 +- .../ebpf/gotracer/bpf_tp_debug_arm64_bpfel.go | 4 +- .../ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o | 4 +- .../ebpf/gotracer/bpf_tp_debug_x86_bpfel.go | 4 +- .../ebpf/gotracer/bpf_tp_debug_x86_bpfel.o | 4 +- .../ebpf/gotracer/bpf_tp_x86_bpfel.go | 4 +- pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.o | 4 +- pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go | 4 +- pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o | 4 +- pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o | 4 +- .../ebpf/httpssl/bpf_debug_arm64_bpfel.o | 4 +- .../ebpf/httpssl/bpf_debug_x86_bpfel.o | 4 +- .../ebpf/httpssl/bpf_tp_arm64_bpfel.o | 4 +- .../ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o | 4 +- .../ebpf/httpssl/bpf_tp_debug_x86_bpfel.o | 4 +- pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o | 4 +- pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o | 4 +- pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o | 4 +- .../ebpf/ktracer/bpf_debug_arm64_bpfel.o | 4 +- .../ebpf/ktracer/bpf_debug_x86_bpfel.o | 4 +- .../ebpf/ktracer/bpf_tp_arm64_bpfel.o | 4 +- .../ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o | 4 +- .../ebpf/ktracer/bpf_tp_debug_x86_bpfel.o | 4 +- pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o | 4 +- pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o | 4 +- pkg/internal/ebpf/nodejs/bpf_arm64_bpfel.o | 4 +- .../ebpf/nodejs/bpf_debug_arm64_bpfel.o | 4 +- .../ebpf/nodejs/bpf_debug_x86_bpfel.o | 4 +- pkg/internal/ebpf/nodejs/bpf_x86_bpfel.o | 4 +- pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o | 2 +- .../ebpf/watcher/bpf_debug_arm64_bpfel.o | 4 +- .../ebpf/watcher/bpf_debug_x86_bpfel.o | 4 +- pkg/internal/ebpf/watcher/bpf_x86_bpfel.o | 2 +- pkg/internal/netolly/ebpf/net_arm64_bpfel.o | 4 +- pkg/internal/netolly/ebpf/net_x86_bpfel.o | 4 +- pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o | 4 +- pkg/internal/netolly/ebpf/netsk_x86_bpfel.o | 4 +- 52 files changed, 273 insertions(+), 248 deletions(-) diff --git a/bpf/go_common.h b/bpf/go_common.h index f440a7fd0..01ca823fa 100644 --- a/bpf/go_common.h +++ b/bpf/go_common.h @@ -32,19 +32,19 @@ char __license[] SEC("license") = "Dual MIT/GPL"; // Then it is retrieved in the return uprobes and used to know the HTTP call duration as well as its // attributes (method, path, and status code). -typedef struct goroutine_key { +typedef struct go_addr_key { u64 pid; // PID of the process u64 addr; // Address of the goroutine -} goroutine_key_t; +} go_addr_key_t; typedef struct goroutine_metadata_t { - goroutine_key_t parent; + go_addr_key_t parent; u64 timestamp; } goroutine_metadata; struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the goroutine + __type(key, go_addr_key_t); // key: pointer to the goroutine __type(value, goroutine_metadata); // value: timestamp of the goroutine creation __uint(max_entries, MAX_CONCURRENT_SHARED_REQUESTS); __uint(pinning, LIBBPF_PIN_BY_NAME); @@ -52,7 +52,7 @@ struct { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, connection_info_t); __uint(max_entries, MAX_CONCURRENT_SHARED_REQUESTS); __uint(pinning, LIBBPF_PIN_BY_NAME); @@ -60,34 +60,34 @@ struct { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, connection_info_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_client_connections SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the goroutine - __type(value, tp_info_t); // value: traceparent info + __type(key, go_addr_key_t); // key: pointer to the goroutine + __type(value, tp_info_t); // value: traceparent info __uint(max_entries, MAX_CONCURRENT_SHARED_REQUESTS); __uint(pinning, LIBBPF_PIN_BY_NAME); } go_trace_map SEC(".maps"); -static __always_inline void goroutine_key_from_id(goroutine_key_t *current, void *goroutine) { +static __always_inline void go_addr_key_from_id(go_addr_key_t *current, void *addr) { u64 pid_tid = bpf_get_current_pid_tgid(); u32 pid = pid_from_pid_tgid(pid_tid); - current->addr = (u64)goroutine; + current->addr = (u64)addr; current->pid = pid; } -static __always_inline u64 find_parent_goroutine(goroutine_key_t *current) { +static __always_inline u64 find_parent_goroutine(go_addr_key_t *current) { if (!current) { return 0; } u64 r_addr = current->addr; - goroutine_key_t *parent = current; + go_addr_key_t *parent = current; int attempts = 0; do { @@ -151,8 +151,8 @@ server_trace_parent(void *goroutine_addr, tp_info_t *tp, void *req_header) { tp->flags = 1; // Get traceparent from the Request.Header void *traceparent_ptr = extract_traceparent_from_req_headers(req_header); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); if (traceparent_ptr != NULL) { unsigned char buf[TP_MAX_VAL_LENGTH]; long res = bpf_probe_read(buf, sizeof(buf), traceparent_ptr); @@ -223,12 +223,12 @@ static __always_inline u8 client_trace_parent(void *goroutine_addr, if (!found_trace_id) { tp_info_t *tp = 0; - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); u64 parent_id = find_parent_goroutine(&g_key); - goroutine_key_t p_key = {}; - goroutine_key_from_id(&p_key, (void *)parent_id); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, (void *)parent_id); if (parent_id) { // we found a parent request tp = (tp_info_t *)bpf_map_lookup_elem(&go_trace_map, &p_key); diff --git a/bpf/go_grpc.h b/bpf/go_grpc.h index 8d3269792..764b51b59 100644 --- a/bpf/go_grpc.h +++ b/bpf/go_grpc.h @@ -28,7 +28,7 @@ typedef struct grpc_srv_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, u16); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_grpc_request_status SEC(".maps"); @@ -47,6 +47,7 @@ typedef struct grpc_transports { connection_info_t conn; } grpc_transports_t; +// TODO: use go_addr_key_t as key struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); __type(key, void *); // key: pointer to the transport pointer @@ -56,26 +57,27 @@ struct { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: goroutine - __type(value, void *); // the transport * + __type(key, go_addr_key_t); // key: goroutine + __type(value, void *); // the transport * __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_grpc_operate_headers SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, grpc_client_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_grpc_client_requests SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, grpc_srv_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_grpc_server_requests SEC(".maps"); // Context propagation +// TODO: use go_addr_key_t as key struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); __type(key, u32); // key: stream id @@ -83,6 +85,7 @@ struct { __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_streams SEC(".maps"); +// TODO: use go_addr_key_t as key struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); __type(key, void *); // key: pointer to the request goroutine @@ -101,8 +104,8 @@ int uprobe_server_handleStream(struct pt_regs *ctx) { bpf_dbg_printk("=== uprobe/server_handleStream === "); void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *stream_ptr = GO_PARAM4(ctx); off_table_t *ot = get_offsets_table(); @@ -143,8 +146,8 @@ SEC("uprobe/netFdReadGRPC") int uprobe_netFdReadGRPC(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/proc netFD read goroutine %lx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *tr = bpf_map_lookup_elem(&ongoing_grpc_operate_headers, &g_key); bpf_dbg_printk("tr %llx", tr); @@ -167,8 +170,8 @@ int uprobe_http2Server_operateHeaders(struct pt_regs *ctx) { void *tr = GO_PARAM1(ctx); bpf_dbg_printk( "=== uprobe/http2Server_operateHeaders tr %llx goroutine %lx === ", tr, goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); grpc_transports_t t = { .type = TRANSPORT_HTTP2, @@ -190,14 +193,14 @@ int uprobe_server_handler_transport_handle_streams(struct pt_regs *ctx) { tr, goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *parent_go = (void *)find_parent_goroutine(&g_key); if (parent_go) { bpf_dbg_printk("found parent goroutine for transport handler [%llx]", parent_go); - goroutine_key_t p_key = {}; - goroutine_key_from_id(&p_key, parent_go); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, parent_go); connection_info_t *conn = bpf_map_lookup_elem(&ongoing_server_connections, &p_key); bpf_dbg_printk("conn %llx", conn); if (conn) { @@ -221,8 +224,8 @@ int uprobe_server_handleStream_return(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); grpc_srv_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_grpc_server_requests, &g_key); @@ -323,8 +326,8 @@ int uprobe_transport_writeStatus(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *status_ptr = GO_PARAM3(ctx); bpf_dbg_printk("status_ptr %lx", status_ptr); @@ -364,8 +367,8 @@ static __always_inline void clientConnStart( .flags = 0, }; off_table_t *ot = get_offsets_table(); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); if (ctx_ptr) { void *val_ptr = 0; @@ -426,8 +429,8 @@ int uprobe_ClientConn_NewStream(struct pt_regs *ctx) { static __always_inline int grpc_connect_done(struct pt_regs *ctx, void *err) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); grpc_client_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_grpc_client_requests, &g_key); @@ -509,8 +512,8 @@ int uprobe_ClientConn_Close(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); bpf_map_delete_elem(&ongoing_grpc_client_requests, &g_key); @@ -547,8 +550,8 @@ int uprobe_transport_http2Client_NewStream(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); void *t_ptr = GO_PARAM1(ctx); off_table_t *ot = get_offsets_table(); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); u64 grpc_t_conn_pos = go_offset_of(ot, (go_offset){.v = _grpc_t_scheme_pos}); bpf_dbg_printk( @@ -627,7 +630,7 @@ typedef struct grpc_framer_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: go routine doing framer write headers + __type(key, go_addr_key_t); // key: go routine doing framer write headers __type( value, grpc_framer_func_invocation_t); // the goroutine of the round trip request, which is the key for our traceparent info @@ -660,8 +663,8 @@ int uprobe_grpcFramerWriteHeaders(struct pt_regs *ctx) { if (invocation) { bpf_dbg_printk("Found invocation info %llx", invocation); void *goroutine_addr = GOROUTINE_PTR(ctx); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *w_ptr = (void *)(framer + framer_w_pos + 16); bpf_probe_read(&w_ptr, sizeof(w_ptr), (void *)(framer + framer_w_pos + 8)); @@ -713,8 +716,8 @@ int uprobe_grpcFramerWriteHeaders_returns(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); off_table_t *ot = get_offsets_table(); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); grpc_framer_func_invocation_t *f_info = bpf_map_lookup_elem(&grpc_framer_invocation_map, &g_key); diff --git a/bpf/go_kafka_go.h b/bpf/go_kafka_go.h index 2cbbc30d2..d7ce47255 100644 --- a/bpf/go_kafka_go.h +++ b/bpf/go_kafka_go.h @@ -29,35 +29,35 @@ typedef struct topic { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, void *); // w_ptr - __type(value, tp_info_t); // traceparent + __type(key, go_addr_key_t); // w_ptr + __type(value, tp_info_t); // traceparent __uint(max_entries, MAX_CONCURRENT_REQUESTS); } produce_traceparents SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // goroutine - __type(value, topic_t); // topic info + __type(key, go_addr_key_t); // goroutine + __type(value, topic_t); // topic info __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_produce_topics SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, void *); // msg ptr - __type(value, topic_t); // topic info + __type(key, go_addr_key_t); // msg ptr + __type(value, topic_t); // topic info __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_produce_messages SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // goroutine + __type(key, go_addr_key_t); // goroutine __type(value, produce_req_t); // rw ptr + start time __uint(max_entries, MAX_CONCURRENT_REQUESTS); } produce_requests SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // goroutine + __type(key, go_addr_key_t); // goroutine __type(value, kafka_go_req_t); // rw ptr + start time __uint(max_entries, MAX_CONCURRENT_REQUESTS); } fetch_requests SEC(".maps"); @@ -74,8 +74,10 @@ int uprobe_writer_write_messages(struct pt_regs *ctx) { // We don't look up in the headers, no http/grpc request, therefore 0 as last argument client_trace_parent(goroutine_addr, &tp, 0); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, w_ptr); - bpf_map_update_elem(&produce_traceparents, &w_ptr, &tp, BPF_ANY); + bpf_map_update_elem(&produce_traceparents, &p_key, &tp, BPF_ANY); return 0; } @@ -83,8 +85,8 @@ SEC("uprobe/writer_produce") int uprobe_writer_produce(struct pt_regs *ctx) { void *goroutine_addr = (void *)GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/kafka-go writer_produce %llx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *w_ptr = (void *)GO_PARAM1(ctx); off_table_t *ot = get_offsets_table(); @@ -96,10 +98,11 @@ int uprobe_writer_produce(struct pt_regs *ctx) { w_ptr + go_offset_of(ot, (go_offset){.v = _kafka_go_writer_topic_pos})); bpf_dbg_printk("topic_ptr %llx", topic_ptr); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, w_ptr); if (topic_ptr) { topic_t topic = {}; - - tp_info_t *tp = bpf_map_lookup_elem(&produce_traceparents, &w_ptr); + tp_info_t *tp = bpf_map_lookup_elem(&produce_traceparents, &p_key); if (tp) { bpf_dbg_printk("found existing traceparent %llx", tp); __builtin_memcpy(&topic.tp, tp, sizeof(tp_info_t)); @@ -111,7 +114,7 @@ int uprobe_writer_produce(struct pt_regs *ctx) { bpf_probe_read_user(&topic.name, sizeof(topic.name), topic_ptr); bpf_map_update_elem(&ongoing_produce_topics, &g_key, &topic, BPF_ANY); } - bpf_map_delete_elem(&produce_traceparents, &w_ptr); + bpf_map_delete_elem(&produce_traceparents, &p_key); } return 0; @@ -121,8 +124,8 @@ SEC("uprobe/client_roundTrip") int uprobe_client_roundTrip(struct pt_regs *ctx) { void *goroutine_addr = (void *)GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/kafka-go client_roundTrip %llx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); topic_t *topic_ptr = bpf_map_lookup_elem(&ongoing_produce_topics, &g_key); @@ -132,7 +135,9 @@ int uprobe_client_roundTrip(struct pt_regs *ctx) { if (msg_ptr) { topic_t topic; __builtin_memcpy(&topic, topic_ptr, sizeof(topic_t)); - bpf_map_update_elem(&ongoing_produce_messages, &msg_ptr, &topic, BPF_ANY); + go_addr_key_t m_key = {}; + go_addr_key_from_id(&m_key, msg_ptr); + bpf_map_update_elem(&ongoing_produce_messages, &m_key, &topic, BPF_ANY); } } @@ -150,11 +155,13 @@ int uprobe_protocol_roundtrip(struct pt_regs *ctx) { bpf_dbg_printk( "goroutine_addr %lx, rw ptr %llx, msg_ptr %llx", goroutine_addr, rw_ptr, msg_ptr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); if (rw_ptr) { - topic_t *topic_ptr = bpf_map_lookup_elem(&ongoing_produce_messages, &msg_ptr); + go_addr_key_t m_key = {}; + go_addr_key_from_id(&m_key, msg_ptr); + topic_t *topic_ptr = bpf_map_lookup_elem(&ongoing_produce_messages, &m_key); bpf_dbg_printk("Found topic %llx", topic_ptr); if (topic_ptr) { produce_req_t p = { @@ -175,8 +182,8 @@ SEC("uprobe/protocol_RoundTrip_ret") int uprobe_protocol_roundtrip_ret(struct pt_regs *ctx) { void *goroutine_addr = (void *)GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/protocol_RoundTrip ret %llx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); produce_req_t *p_ptr = bpf_map_lookup_elem(&produce_requests, &g_key); @@ -184,7 +191,9 @@ int uprobe_protocol_roundtrip_ret(struct pt_regs *ctx) { if (p_ptr) { void *msg_ptr = (void *)p_ptr->msg_ptr; - topic_t *topic_ptr = bpf_map_lookup_elem(&ongoing_produce_messages, &msg_ptr); + go_addr_key_t m_key = {}; + go_addr_key_from_id(&m_key, msg_ptr); + topic_t *topic_ptr = bpf_map_lookup_elem(&ongoing_produce_messages, &m_key); bpf_dbg_printk("goroutine_addr %lx, conn ptr %llx", goroutine_addr, p_ptr->conn_ptr); bpf_dbg_printk("msg_ptr = %llx, topic_ptr = %llx", p_ptr->msg_ptr, topic_ptr); @@ -214,7 +223,7 @@ int uprobe_protocol_roundtrip_ret(struct pt_regs *ctx) { bpf_ringbuf_submit(trace, get_flags()); } } - bpf_map_delete_elem(&ongoing_produce_messages, &msg_ptr); + bpf_map_delete_elem(&ongoing_produce_messages, &m_key); } bpf_map_delete_elem(&produce_requests, &g_key); @@ -231,8 +240,8 @@ int uprobe_reader_read(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("=== uprobe/kafka-go reader_read %llx r_ptr %llx=== ", goroutine_addr, r_ptr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); if (r_ptr) { kafka_go_req_t r = { @@ -273,8 +282,8 @@ SEC("uprobe/reader_send_message") int uprobe_reader_send_message(struct pt_regs *ctx) { void *goroutine_addr = (void *)GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/kafka-go reader_send_message %llx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); kafka_go_req_t *req = (kafka_go_req_t *)bpf_map_lookup_elem(&fetch_requests, &g_key); bpf_dbg_printk("Found req_ptr %llx", req); @@ -290,8 +299,8 @@ SEC("uprobe/reader_read") int uprobe_reader_read_ret(struct pt_regs *ctx) { void *goroutine_addr = (void *)GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/kafka-go reader_read ret %llx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); kafka_go_req_t *req = (kafka_go_req_t *)bpf_map_lookup_elem(&fetch_requests, &g_key); bpf_dbg_printk("Found req_ptr %llx", req); diff --git a/bpf/go_nethttp.h b/bpf/go_nethttp.h index e7e08db37..b09ccfe2b 100644 --- a/bpf/go_nethttp.h +++ b/bpf/go_nethttp.h @@ -40,14 +40,14 @@ typedef struct http_client_data { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, http_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_http_client_requests SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, http_client_data_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_http_client_requests_data SEC(".maps"); @@ -64,7 +64,7 @@ typedef struct server_http_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, server_http_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_http_server_requests SEC(".maps"); @@ -81,8 +81,8 @@ int uprobe_ServeHTTP(struct pt_regs *ctx) { bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); void *req = GO_PARAM4(ctx); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); off_table_t *ot = get_offsets_table(); @@ -161,8 +161,8 @@ int uprobe_readRequestStart(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); connection_info_t *existing = bpf_map_lookup_elem(&ongoing_server_connections, &g_key); @@ -206,8 +206,8 @@ int uprobe_readRequestReturns(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); // This code is here for keepalive support on HTTP requests. Since the connection is not // established everytime, we set the initial goroutine start on the new read initiation. @@ -232,8 +232,8 @@ int uprobe_ServeHTTPReturns(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); server_http_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_http_server_requests, &g_key); @@ -242,8 +242,8 @@ int uprobe_ServeHTTPReturns(struct pt_regs *ctx) { void *parent_go = (void *)find_parent_goroutine(&g_key); if (parent_go) { bpf_dbg_printk("found parent goroutine for header [%llx]", parent_go); - goroutine_key_t p_key = {}; - goroutine_key_from_id(&p_key, parent_go); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, parent_go); invocation = bpf_map_lookup_elem(&ongoing_http_server_requests, &p_key); goroutine_addr = parent_go; g_key.addr = (u64)goroutine_addr; @@ -328,8 +328,8 @@ static __always_inline void roundTripStartHelper(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); void *req = GO_PARAM2(ctx); off_table_t *ot = get_offsets_table(); @@ -411,8 +411,8 @@ int uprobe_roundTripReturn(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); http_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_http_client_requests, &g_key); if (invocation == NULL) { @@ -497,8 +497,8 @@ int uprobe_writeSubset(struct pt_regs *ctx) { return 0; } u64 parent_goaddr = *request_goaddr; - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, (void *)parent_goaddr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, (void *)parent_goaddr); http_func_invocation_t *func_inv = bpf_map_lookup_elem(&ongoing_http_client_requests, &g_key); if (!func_inv) { @@ -564,8 +564,8 @@ int uprobe_http2ResponseWriterStateWriteHeader(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); u64 status = (u64)GO_PARAM2(ctx); bpf_dbg_printk("goroutine_addr %lx, status %d", goroutine_addr, status); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); server_http_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_http_server_requests, &g_key); @@ -574,8 +574,8 @@ int uprobe_http2ResponseWriterStateWriteHeader(struct pt_regs *ctx) { void *parent_go = (void *)find_parent_goroutine(&g_key); if (parent_go) { bpf_dbg_printk("found parent goroutine for header [%llx]", parent_go); - goroutine_key_t p_key = {}; - goroutine_key_from_id(&p_key, parent_go); + go_addr_key_t p_key = {}; + go_addr_key_from_id(&p_key, parent_go); invocation = bpf_map_lookup_elem(&ongoing_http_server_requests, &p_key); goroutine_addr = parent_go; } @@ -601,8 +601,8 @@ int uprobe_http2serverConn_runHandler(struct pt_regs *ctx) { void *sc = GO_PARAM1(ctx); off_table_t *ot = get_offsets_table(); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); if (sc) { void *conn_ptr = 0; @@ -628,7 +628,7 @@ int uprobe_http2serverConn_runHandler(struct pt_regs *ctx) { #ifndef NO_HEADER_PROPAGATION struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, u32); // key: stream id + __type(key, go_addr_key_t); // key: stream id __type( value, u64); // the goroutine of the round trip request, which is the key for our traceparent info @@ -663,8 +663,8 @@ int uprobe_http2RoundTrip(struct pt_regs *ctx) { if (ok) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); bpf_map_update_elem(&ongoing_client_connections, &g_key, &conn, BPF_ANY); } @@ -680,8 +680,9 @@ int uprobe_http2RoundTrip(struct pt_regs *ctx) { bpf_dbg_printk("cc_ptr = %llx, nextStreamID=%d", cc_ptr, stream_id); if (stream_id) { void *goroutine_addr = GOROUTINE_PTR(ctx); - - bpf_map_update_elem(&http2_req_map, &stream_id, &goroutine_addr, BPF_ANY); + go_addr_key_t s_key = {}; + go_addr_key_from_id(&s_key, (void *)(uintptr_t)stream_id); + bpf_map_update_elem(&http2_req_map, &s_key, &goroutine_addr, BPF_ANY); } #endif } @@ -700,7 +701,7 @@ typedef struct framer_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: go routine doing framer write headers + __type(key, go_addr_key_t); // key: go routine doing framer write headers __type( value, framer_func_invocation_t); // the goroutine of the round trip request, which is the key for our traceparent info @@ -724,14 +725,15 @@ int uprobe_http2FramerWriteHeaders(struct pt_regs *ctx) { bpf_dbg_printk("framer=%llx, stream_id=%lld", framer, ((u64)stream_id)); u32 stream_lookup = (u32)stream_id; - - void **go_ptr = bpf_map_lookup_elem(&http2_req_map, &stream_lookup); + go_addr_key_t s_key = {}; + go_addr_key_from_id(&s_key, (void *)(uintptr_t)stream_lookup); + void **go_ptr = bpf_map_lookup_elem(&http2_req_map, &s_key); if (go_ptr) { void *go_addr = *go_ptr; bpf_dbg_printk("Found existing stream data goaddr = %llx", go_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, go_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, go_addr); http_func_invocation_t *info = bpf_map_lookup_elem(&ongoing_http_client_requests, &g_key); @@ -759,8 +761,8 @@ int uprobe_http2FramerWriteHeaders(struct pt_regs *ctx) { .framer_ptr = (u64)framer, .initial_n = n, }; - goroutine_key_t f_key = {}; - goroutine_key_from_id(&f_key, goroutine_addr); + go_addr_key_t f_key = {}; + go_addr_key_from_id(&f_key, goroutine_addr); bpf_map_update_elem(&framer_invocation_map, &f_key, &f_info, BPF_ANY); } else { @@ -770,7 +772,7 @@ int uprobe_http2FramerWriteHeaders(struct pt_regs *ctx) { } } - bpf_map_delete_elem(&http2_req_map, &stream_lookup); + bpf_map_delete_elem(&http2_req_map, &s_key); return 0; } #else @@ -790,8 +792,8 @@ int uprobe_http2FramerWriteHeaders_returns(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); off_table_t *ot = get_offsets_table(); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); framer_func_invocation_t *f_info = bpf_map_lookup_elem(&framer_invocation_map, &g_key); @@ -893,8 +895,8 @@ int uprobe_connServe(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/proc http conn serve goroutine %lx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); connection_info_t conn = {0}; bpf_map_update_elem(&ongoing_server_connections, &g_key, &conn, BPF_ANY); @@ -907,8 +909,8 @@ int uprobe_netFdRead(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("=== uprobe/proc netFD read goroutine %lx === ", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); connection_info_t *conn = bpf_map_lookup_elem(&ongoing_server_connections, &g_key); @@ -931,8 +933,8 @@ int uprobe_connServeRet(struct pt_regs *ctx) { bpf_dbg_printk("=== uprobe/proc http conn serve ret === "); void *goroutine_addr = GOROUTINE_PTR(ctx); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); bpf_map_delete_elem(&ongoing_server_connections, &g_key); @@ -946,8 +948,8 @@ int uprobe_persistConnRoundTrip(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); http_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_http_client_requests, &g_key); if (!invocation) { diff --git a/bpf/go_redis.h b/bpf/go_redis.h index 94c4d5998..ee165674e 100644 --- a/bpf/go_redis.h +++ b/bpf/go_redis.h @@ -17,15 +17,15 @@ struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, void *); // key: goroutine id + __type(key, go_addr_key_t); // key: goroutine id __type(value, redis_client_req_t); // the request __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_redis_requests SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, void *); // key: goroutine id - __type(value, void *); // the *Conn + __type(key, go_addr_key_t); // key: goroutine id + __type(value, void *); // the *Conn __uint(max_entries, MAX_CONCURRENT_REQUESTS); } redis_writes SEC(".maps"); @@ -34,11 +34,13 @@ static __always_inline void setup_request(void *goroutine_addr) { .type = EVENT_GO_REDIS, .start_monotime_ns = bpf_ktime_get_ns(), }; + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); // We don't look up in the headers, no http/grpc request, therefore 0 as last argument client_trace_parent(goroutine_addr, &req.tp, 0); - bpf_map_update_elem(&ongoing_redis_requests, &goroutine_addr, &req, BPF_ANY); + bpf_map_update_elem(&ongoing_redis_requests, &g_key, &req, BPF_ANY); } // github.com/redis/go-redis/v9.(*baseClient)._process @@ -59,8 +61,10 @@ int uprobe_redis_process_ret(struct pt_regs *ctx) { bpf_dbg_printk("=== uprobe/redis _process returns === "); void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); - redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &goroutine_addr); + redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &g_key); if (req) { redis_client_req_t *trace = bpf_ringbuf_reserve(&events, sizeof(redis_client_req_t), 0); if (trace) { @@ -72,7 +76,7 @@ int uprobe_redis_process_ret(struct pt_regs *ctx) { } } - bpf_map_delete_elem(&ongoing_redis_requests, &goroutine_addr); + bpf_map_delete_elem(&ongoing_redis_requests, &g_key); return 0; } @@ -90,12 +94,14 @@ int uprobe_redis_with_writer(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); - redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &goroutine_addr); + redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &g_key); if (!req) { setup_request(goroutine_addr); - req = bpf_map_lookup_elem(&ongoing_redis_requests, &goroutine_addr); + req = bpf_map_lookup_elem(&ongoing_redis_requests, &g_key); } if (req) { @@ -106,7 +112,7 @@ int uprobe_redis_with_writer(struct pt_regs *ctx) { cn_ptr + go_offset_of(ot, (go_offset){.v = _redis_conn_bw_pos})); bpf_dbg_printk("bw_ptr %llx", bw_ptr); - bpf_map_update_elem(&redis_writes, &goroutine_addr, &bw_ptr, BPF_ANY); + bpf_map_update_elem(&redis_writes, &g_key, &bw_ptr, BPF_ANY); if (cn_ptr) { void *tcp_conn_ptr = cn_ptr + 8; @@ -135,11 +141,13 @@ int uprobe_redis_with_writer_ret(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); - redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &goroutine_addr); + redis_client_req_t *req = bpf_map_lookup_elem(&ongoing_redis_requests, &g_key); if (req) { - void **bw_ptr = bpf_map_lookup_elem(&redis_writes, &goroutine_addr); + void **bw_ptr = bpf_map_lookup_elem(&redis_writes, &g_key); if (bw_ptr) { void *bw = *bw_ptr; diff --git a/bpf/go_runtime.h b/bpf/go_runtime.h index 157d558eb..c834ebf6f 100644 --- a/bpf/go_runtime.h +++ b/bpf/go_runtime.h @@ -20,7 +20,7 @@ typedef struct new_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, new_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } newproc1 SEC(".maps"); @@ -32,8 +32,8 @@ int uprobe_proc_newproc1(struct pt_regs *ctx) { bpf_dbg_printk("creator_goroutine_addr %lx", creator_goroutine); new_func_invocation_t invocation = {.parent = (u64)GO_PARAM2(ctx)}; - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, creator_goroutine); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, creator_goroutine); // Save the registers on invocation to be able to fetch the arguments at return of newproc1 if (bpf_map_update_elem(&newproc1, &g_key, &invocation, BPF_ANY)) { @@ -49,7 +49,7 @@ int uprobe_proc_newproc1_ret(struct pt_regs *ctx) { void *creator_goroutine = GOROUTINE_PTR(ctx); u64 pid_tid = bpf_get_current_pid_tgid(); u32 pid = pid_from_pid_tgid(pid_tid); - goroutine_key_t c_key = {.addr = (u64)creator_goroutine, .pid = pid}; + go_addr_key_t c_key = {.addr = (u64)creator_goroutine, .pid = pid}; bpf_dbg_printk("creator_goroutine_addr %lx", creator_goroutine); @@ -68,8 +68,8 @@ int uprobe_proc_newproc1_ret(struct pt_regs *ctx) { void *goroutine_addr = (void *)GO_PARAM1(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {.addr = (u64)goroutine_addr, .pid = pid}; - goroutine_key_t p_key = {.addr = (u64)parent_goroutine, .pid = pid}; + go_addr_key_t g_key = {.addr = (u64)goroutine_addr, .pid = pid}; + go_addr_key_t p_key = {.addr = (u64)parent_goroutine, .pid = pid}; goroutine_metadata metadata = { .timestamp = bpf_ktime_get_ns(), @@ -96,7 +96,7 @@ int uprobe_proc_goexit1(struct pt_regs *ctx) { u64 pid_tid = bpf_get_current_pid_tgid(); u32 pid = pid_from_pid_tgid(pid_tid); - goroutine_key_t g_key = {.addr = (u64)goroutine_addr, .pid = pid}; + go_addr_key_t g_key = {.addr = (u64)goroutine_addr, .pid = pid}; bpf_map_delete_elem(&ongoing_goroutines, &g_key); // We also clean-up the go routine based trace map, it's an LRU diff --git a/bpf/go_sarama.h b/bpf/go_sarama.h index f31680587..698122ef8 100644 --- a/bpf/go_sarama.h +++ b/bpf/go_sarama.h @@ -18,15 +18,15 @@ struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, u32); // key: correlation id + __type(key, go_addr_key_t); // key: correlation id __type(value, kafka_client_req_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } kafka_requests SEC(".maps"); struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: goroutine id - __type(value, u32); // correlation id + __type(key, go_addr_key_t); // key: goroutine id + __type(value, u32); // correlation id __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_kafka_requests SEC(".maps"); @@ -38,8 +38,8 @@ int uprobe_sarama_sendInternal(struct pt_regs *ctx) { off_table_t *ot = get_offsets_table(); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); u32 correlation_id = 0; @@ -66,8 +66,8 @@ int uprobe_sarama_broker_write(struct pt_regs *ctx) { void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); u32 *invocation = bpf_map_lookup_elem(&ongoing_kafka_requests, &g_key); void *b_ptr = GO_PARAM1(ctx); @@ -121,7 +121,9 @@ int uprobe_sarama_broker_write(struct pt_regs *ctx) { bpf_dbg_printk("correlation_id = %d", correlation_id); bpf_probe_read(req.buf, KAFKA_MAX_LEN, buf_ptr); - bpf_map_update_elem(&kafka_requests, &correlation_id, &req, BPF_ANY); + go_addr_key_t k_key = {}; + go_addr_key_from_id(&k_key, (void *)(uintptr_t)correlation_id); + bpf_map_update_elem(&kafka_requests, &k_key, &req, BPF_ANY); } } @@ -147,7 +149,9 @@ int uprobe_sarama_response_promise_handle(struct pt_regs *ctx) { bpf_dbg_printk("correlation_id = %d", correlation_id); if (correlation_id) { - kafka_client_req_t *req = bpf_map_lookup_elem(&kafka_requests, &correlation_id); + go_addr_key_t k_key = {}; + go_addr_key_from_id(&k_key, (void *)(uintptr_t)correlation_id); + kafka_client_req_t *req = bpf_map_lookup_elem(&kafka_requests, &k_key); if (req) { req->end_monotime_ns = bpf_ktime_get_ns(); @@ -162,8 +166,7 @@ int uprobe_sarama_response_promise_handle(struct pt_regs *ctx) { bpf_ringbuf_submit(trace, get_flags()); } } - - bpf_map_delete_elem(&kafka_requests, &correlation_id); + bpf_map_delete_elem(&kafka_requests, &k_key); } } diff --git a/bpf/go_sql.h b/bpf/go_sql.h index 349941e8e..4037d4c2a 100644 --- a/bpf/go_sql.h +++ b/bpf/go_sql.h @@ -35,7 +35,7 @@ typedef struct sql_func_invocation { struct { __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, goroutine_key_t); // key: pointer to the request goroutine + __type(key, go_addr_key_t); // key: pointer to the request goroutine __type(value, sql_func_invocation_t); __uint(max_entries, MAX_CONCURRENT_REQUESTS); } ongoing_sql_queries SEC(".maps"); @@ -48,8 +48,8 @@ static __always_inline void set_sql_info(void *goroutine_addr, void *sql_param, // We don't look up in the headers, no http/grpc request, therefore 0 as last argument client_trace_parent(goroutine_addr, &invocation.tp, 0); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); // Write event if (bpf_map_update_elem(&ongoing_sql_queries, &g_key, &invocation, BPF_ANY)) { @@ -87,8 +87,8 @@ int uprobe_queryReturn(struct pt_regs *ctx) { bpf_dbg_printk("=== uprobe/query return === "); void *goroutine_addr = GOROUTINE_PTR(ctx); bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - goroutine_key_t g_key = {}; - goroutine_key_from_id(&g_key, goroutine_addr); + go_addr_key_t g_key = {}; + go_addr_key_from_id(&g_key, goroutine_addr); sql_func_invocation_t *invocation = bpf_map_lookup_elem(&ongoing_sql_queries, &g_key); if (invocation == NULL) { diff --git a/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go index 6f6d0982f..961953411 100644 --- a/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.go @@ -19,13 +19,13 @@ type bpfConnectionInfoT struct { D_port uint16 } -type bpfGoroutineKeyT struct { +type bpfGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpfGoroutineMetadata struct { - Parent bpfGoroutineKeyT + Parent bpfGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o index b4e2ab4eb..b4fdbc36d 100644 --- a/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de6e87481f0aae98861d5c6a0f005df822626e0582e5b8170b77154f48e5e858 -size 390064 +oid sha256:f3a9b4c9789c135d5b52581a1f4fd48ed6ced7af8ee9fc4c28ec01f100543e7e +size 382680 diff --git a/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.go index ca9b232dd..fbc88dbae 100644 --- a/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.go @@ -19,13 +19,13 @@ type bpf_debugConnectionInfoT struct { D_port uint16 } -type bpf_debugGoroutineKeyT struct { +type bpf_debugGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_debugGoroutineMetadata struct { - Parent bpf_debugGoroutineKeyT + Parent bpf_debugGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.o index 5cb7c51d5..93174126b 100644 --- a/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a08cbf8cbe407f827fbab1c286e625e6f53b8e3b72a104dbd99e679cedc5683d -size 876392 +oid sha256:fb096d0e0c62790aa7bad6b114a37f3d28fb66345d4031c04936dba2743cc063 +size 861832 diff --git a/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.go index 603dce16c..828140e9c 100644 --- a/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.go @@ -19,13 +19,13 @@ type bpf_debugConnectionInfoT struct { D_port uint16 } -type bpf_debugGoroutineKeyT struct { +type bpf_debugGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_debugGoroutineMetadata struct { - Parent bpf_debugGoroutineKeyT + Parent bpf_debugGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.o index b474d78de..6eeb19938 100644 --- a/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c638b5a143f1249ac2cc9f5dc1378daa3f0ac8989d305cfc80faa924eaa78d3 -size 878224 +oid sha256:a261b27b25e1a4e0282bfa2af58445e5fe45c14153d485abbb159d5ff47fb48f +size 863640 diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.go index b6d166211..b8901a386 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.go @@ -25,13 +25,13 @@ type bpf_tpFramerFuncInvocationT struct { InitialN int64 } -type bpf_tpGoroutineKeyT struct { +type bpf_tpGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_tpGoroutineMetadata struct { - Parent bpf_tpGoroutineKeyT + Parent bpf_tpGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.o index 8ca882297..3364cee8d 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_tp_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7df80fee3825d147b9a5b2af94cb3820e2d1544baa3812b3b6052809c5eb01c0 -size 436264 +oid sha256:679164c8aa3137f959438871b95195d2f8e0c03a3757ab7154f2e5f28a9ce193 +size 429024 diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.go index a4d6bd986..7519e85a9 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.go @@ -25,13 +25,13 @@ type bpf_tp_debugFramerFuncInvocationT struct { InitialN int64 } -type bpf_tp_debugGoroutineKeyT struct { +type bpf_tp_debugGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_tp_debugGoroutineMetadata struct { - Parent bpf_tp_debugGoroutineKeyT + Parent bpf_tp_debugGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o index 6d578ff13..7b8bb49ce 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_tp_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a458aa266a547092976a30758a33060b5e8b7d8a46f77051600aa2f5695b9f7e -size 973912 +oid sha256:5084aaf7d9b5fd9896fc0d53a81b023ea28af86890fcacaf74a178d4f842d3ac +size 959312 diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.go index a97386482..a3e1c4127 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.go @@ -25,13 +25,13 @@ type bpf_tp_debugFramerFuncInvocationT struct { InitialN int64 } -type bpf_tp_debugGoroutineKeyT struct { +type bpf_tp_debugGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_tp_debugGoroutineMetadata struct { - Parent bpf_tp_debugGoroutineKeyT + Parent bpf_tp_debugGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.o index 8ae94652d..002cd955a 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_tp_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a20e08826189ebbfd20b052849d23dbb8f5ba61d8872868d06604aa22cd7527 -size 975736 +oid sha256:18bb7f92760f2522a78e33a4d711b31353879c92cf35c7fec8bcffbb3b5be1bf +size 961104 diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.go index 19544b597..751b3b4fd 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.go @@ -25,13 +25,13 @@ type bpf_tpFramerFuncInvocationT struct { InitialN int64 } -type bpf_tpGoroutineKeyT struct { +type bpf_tpGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpf_tpGoroutineMetadata struct { - Parent bpf_tpGoroutineKeyT + Parent bpf_tpGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.o index 13d1c2950..834fa1317 100644 --- a/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_tp_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ca0ed049eda7f6342167a21ce32d108dd460d0b0a70c552b687c2d0a0ea03132 -size 438096 +oid sha256:95325b0acb9ca758bbabb6a03e4de584295b67e602a72a0927f4b33fdb057a8f +size 430768 diff --git a/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go b/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go index 2ca52cc37..ff00235c0 100644 --- a/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go +++ b/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.go @@ -19,13 +19,13 @@ type bpfConnectionInfoT struct { D_port uint16 } -type bpfGoroutineKeyT struct { +type bpfGoAddrKeyT struct { Pid uint64 Addr uint64 } type bpfGoroutineMetadata struct { - Parent bpfGoroutineKeyT + Parent bpfGoAddrKeyT Timestamp uint64 } diff --git a/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o b/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o index a3bb36bce..e59c387ba 100644 --- a/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o +++ b/pkg/internal/ebpf/gotracer/bpf_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3ec207a3bb7f3a21d02c661643ad13b7d0e5c9ea9d20d1e53bd6d14b9c911c9 -size 391896 +oid sha256:4f96020ea1cef30aa3a39ea54bc24447f153a46ffe89484be0369752597aecad +size 384488 diff --git a/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o index ceb6f81da..b472adfb5 100644 --- a/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c96e3ab50afc9e8c3405ac78ff350291164cb03a78316e0a18330c94afc308a3 -size 244792 +oid sha256:fb1805daa1d8b5808166d0a544168af78c9b3873be6045939e8d7ae17363452f +size 247392 diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o index e7525e1dd..35e9c3583 100644 --- a/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a8347b37ba11c77b9bd845a0159f5012dedc9b51c6fc7c3a18a750dba7df0ee -size 403328 +oid sha256:9899992ce24a4c3c3cd193bf0ff7b1bcf47fc0e4de924c3d5fad041a998dfbe2 +size 404064 diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o index 5ba0542e2..b366dfd94 100644 --- a/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:109a20b4ce2097a2b242e7699fb46c5cfd75ab908e7c202346b824b80f771d68 -size 404512 +oid sha256:bbd7152a9bda38e51778cc8d30024f3b3fbe5c48bb9a0752e2a26be3e2fec92d +size 405224 diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o index a8299b7b6..646d68d98 100644 --- a/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_tp_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b57a6445be370d7d24a7d43060fa970de4d0fd8b0dd4b7178e5156129c12e93c -size 259504 +oid sha256:c1d95e9da9000b1fa48f8307a048005e2d2b24a21786e2617f7d2b05c318c010 +size 261968 diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o index f6aeefa33..fd02b4982 100644 --- a/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_tp_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fee0c7884472c0e130bfd52d08f322b02b0f91e93223cbe2b7deff02a107e6d6 -size 421808 +oid sha256:013d67c5b844d5dca11cb41e3419d09f84b53099607256cf05179cf65fe46293 +size 422704 diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o index ebc207c47..053d27274 100644 --- a/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_tp_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c07c72616ce28fc1dbb1b854155b2d9d72c4402319a258cffb4217c56098fc9 -size 422992 +oid sha256:7ddfb61271ceffef4971718d18716fd12fd361ebadac56cdb5c964d470ada24c +size 423872 diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o index 541ba26ce..5f2fea6eb 100644 --- a/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_tp_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a60399fc752fd1dd22e1b01c230a4c54182237db0dc96fee5e7283ddc89e28a7 -size 260688 +oid sha256:afab84a64fb53e8717925cd09ccd5c6953e68de13b01cad7ccaeca991251aa76 +size 263128 diff --git a/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o b/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o index b45a2130a..a18ca55ce 100644 --- a/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o +++ b/pkg/internal/ebpf/httpssl/bpf_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85531578e47d8a5aa4dd56d7d5a7eb90aee7668b5b90569b75c3ed33c5121c4d -size 245976 +oid sha256:b635b57038bcd7773d81dcaecc870ead9af6ceabf32c3b0a84ca7d125ac256b4 +size 248552 diff --git a/pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o index 4df2dba86..dbc4693e6 100644 --- a/pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8f7a9a0a2896e37d742994a188fb2d226ec67b9bed6d4e923eca80a29aacf39 -size 354456 +oid sha256:e98518c5d060098ba012344e28497d5a62187692f239e90c4e4e0936f07aa3d7 +size 352328 diff --git a/pkg/internal/ebpf/ktracer/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_debug_arm64_bpfel.o index 66fa3bda3..ae2eb3e83 100644 --- a/pkg/internal/ebpf/ktracer/bpf_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92dd9c29a41f21770ca9e54bf4e590fb411e76c3460de1a2068ecbc9b6d84e82 -size 541728 +oid sha256:67da579b78c7629043f5e52467bae20c7ef0264524041059f4bef21b737a91dd +size 537568 diff --git a/pkg/internal/ebpf/ktracer/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_debug_x86_bpfel.o index ef5c399b9..f967acb39 100644 --- a/pkg/internal/ebpf/ktracer/bpf_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62c930bb3b52d678e81cea8da1889700c069a250d3cb5432085985949475e6ee -size 541576 +oid sha256:c906cba41a7bd589b2b4e3db3253c12cad32030e08bb564e05538f2d75bfecad +size 537176 diff --git a/pkg/internal/ebpf/ktracer/bpf_tp_arm64_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_tp_arm64_bpfel.o index ae28302ee..649519172 100644 --- a/pkg/internal/ebpf/ktracer/bpf_tp_arm64_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_tp_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ee5305de48c7c54787379b8420f36d7679c493a5924a9d58ef07a38c36b3048 -size 369136 +oid sha256:169e371544bb658cb5e7ceeb10f26bf6950a785410629c517638f191fd96f6eb +size 366872 diff --git a/pkg/internal/ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o index 35d6f8bfe..44f614bb4 100644 --- a/pkg/internal/ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_tp_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f409edafb2646528e51e4d18f56bb7721228b8dce3ff863555da38748a22f9d -size 560216 +oid sha256:936f40678a064bebb36f46ec725e11cd6cd70eaf0889ed6086f90c32d5072587 +size 556224 diff --git a/pkg/internal/ebpf/ktracer/bpf_tp_debug_x86_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_tp_debug_x86_bpfel.o index 225f83a44..717c5ad05 100644 --- a/pkg/internal/ebpf/ktracer/bpf_tp_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_tp_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43eb695971127212f418932960574303eff75ac4c3e5245e73295fea6e7ee271 -size 560064 +oid sha256:097fda451315a72087f4a40d3be45beb23707fa25b9bc39f6641496543a9295d +size 555832 diff --git a/pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o index d55da0027..6dca75160 100644 --- a/pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_tp_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23cacf2cc9cf33e0a84f8fbb0cd730c8eafb8c504786e03d12bcc369c64c21ca -size 368880 +oid sha256:015a20e28c344c3ddcccd3051adbdf640fc809500f9f691d8f8441c3013afffa +size 366368 diff --git a/pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o b/pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o index 8f676e5d3..f5266d113 100644 --- a/pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o +++ b/pkg/internal/ebpf/ktracer/bpf_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbdecfaa9769836497a4b81464d015183645c32d87ee407077af86c31814aa79 -size 354192 +oid sha256:a7556a1cae1dad1c09e7acc817c1debaf7f60876f602dc31d5a8bcb70df27f34 +size 351816 diff --git a/pkg/internal/ebpf/nodejs/bpf_arm64_bpfel.o b/pkg/internal/ebpf/nodejs/bpf_arm64_bpfel.o index 79ae33c3b..e814e8f52 100644 --- a/pkg/internal/ebpf/nodejs/bpf_arm64_bpfel.o +++ b/pkg/internal/ebpf/nodejs/bpf_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b8c39642521488768aeb63a5275179b0fc63e52fa3667bed8eb1250044d750d -size 49784 +oid sha256:30648baf86586785a9e58fc7ee04b4b7f22cc8a3fa7e10fb19e199308be30a48 +size 49656 diff --git a/pkg/internal/ebpf/nodejs/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/nodejs/bpf_debug_arm64_bpfel.o index 0f8d3fc70..61877afa5 100644 --- a/pkg/internal/ebpf/nodejs/bpf_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/nodejs/bpf_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b16e818f1663f78e70d97ab84c6002ec997fe65fd3b6cbd8059df32d2de86197 -size 70752 +oid sha256:aba923be22aa35828f617682c6a6845eca74ee5416b76ae3f18524b230efa201 +size 70272 diff --git a/pkg/internal/ebpf/nodejs/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/nodejs/bpf_debug_x86_bpfel.o index cf39c4f8f..1c09e10d5 100644 --- a/pkg/internal/ebpf/nodejs/bpf_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/nodejs/bpf_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:907a00b3bcc7712b57cb358332c7d4b0de7ffda1c26085b5e1460fc0637f414b -size 72280 +oid sha256:698dc086d489f2b547ca48e6edb95458d9fadd8b9fd3de72446889ba9f2c051e +size 71776 diff --git a/pkg/internal/ebpf/nodejs/bpf_x86_bpfel.o b/pkg/internal/ebpf/nodejs/bpf_x86_bpfel.o index 33521160d..5f51a9e4e 100644 --- a/pkg/internal/ebpf/nodejs/bpf_x86_bpfel.o +++ b/pkg/internal/ebpf/nodejs/bpf_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3753b9a2d02bc54349fa9ecd40b1ebb537c1d0166a59060e4c51c75a4117034f -size 51312 +oid sha256:bd3a80c3e4fd623087c00b697de954de636018580dbf5db294a75b07c3790134 +size 51168 diff --git a/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o b/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o index cd6d838b9..807ad9fe7 100644 --- a/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o +++ b/pkg/internal/ebpf/watcher/bpf_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e141ab06f68d4f191f0e3e505784bb6a61b78c30819966df7c7c301b34ed59c2 +oid sha256:f95505b6e9d3fc4fc131ab0d160f3abf41cab29dd50109a3f10aa2375dd38bae size 6912 diff --git a/pkg/internal/ebpf/watcher/bpf_debug_arm64_bpfel.o b/pkg/internal/ebpf/watcher/bpf_debug_arm64_bpfel.o index 032684051..9291ed9d0 100644 --- a/pkg/internal/ebpf/watcher/bpf_debug_arm64_bpfel.o +++ b/pkg/internal/ebpf/watcher/bpf_debug_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46c92d762aa9055cb198e8a7779986de075eab924a6bd53678ba0787aaf53c66 -size 8864 +oid sha256:6472cdadb0631539ae29e08424aa42c41dc315018d0d9169afa355c90c23f6a4 +size 8880 diff --git a/pkg/internal/ebpf/watcher/bpf_debug_x86_bpfel.o b/pkg/internal/ebpf/watcher/bpf_debug_x86_bpfel.o index 78f337b9e..949d9759e 100644 --- a/pkg/internal/ebpf/watcher/bpf_debug_x86_bpfel.o +++ b/pkg/internal/ebpf/watcher/bpf_debug_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a2ecdfae63b5bb894bca30d52a4c030b70130baac9c5ba6c195ab0336f059a66 -size 8728 +oid sha256:631bdc3073e93076c12bc82dc29fb410f7c11aceeabb8ddac1314309cceed892 +size 8736 diff --git a/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o b/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o index 826e57682..a5a23fbee 100644 --- a/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o +++ b/pkg/internal/ebpf/watcher/bpf_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92eb613aa18fd1fb18a59297ede757f6f444f13014fadfb7262c2d2869e23e06 +oid sha256:1699bb5f44955548bbe22e52232713d2fc36469eba3b371887fbe0052b8d29b0 size 6768 diff --git a/pkg/internal/netolly/ebpf/net_arm64_bpfel.o b/pkg/internal/netolly/ebpf/net_arm64_bpfel.o index c26a2a9fd..e5b62d44d 100644 --- a/pkg/internal/netolly/ebpf/net_arm64_bpfel.o +++ b/pkg/internal/netolly/ebpf/net_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2d5bbea40924b5d2e5954cb9ee69a8ec5008777747516586225d77ae3b5fa26 -size 31232 +oid sha256:f342b83229a3b3ab3d2213db8f98df776186589ec9962210af3cbdbb0091a7fb +size 31400 diff --git a/pkg/internal/netolly/ebpf/net_x86_bpfel.o b/pkg/internal/netolly/ebpf/net_x86_bpfel.o index d6a7147cc..4a6513b89 100644 --- a/pkg/internal/netolly/ebpf/net_x86_bpfel.o +++ b/pkg/internal/netolly/ebpf/net_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6df5d77381c807c9770eda78ad45116fdf93bfcdbad9aaec7c1568d512693dd -size 31000 +oid sha256:58f97438ac4f934ddbb19f5fd142d7d20fd785ec279aaf4796117eb0f64e91d0 +size 31176 diff --git a/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o b/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o index 1b14dc48a..6dff9aa6f 100644 --- a/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o +++ b/pkg/internal/netolly/ebpf/netsk_arm64_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:804b4d262d43a1432af8027545e362ede6c4fe6fd274e521fd6084727103d268 -size 28584 +oid sha256:56c354ddfc8625aeba39f33f899d237e85c2109cfd641adc64c83137baafbd6d +size 28760 diff --git a/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o b/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o index 916be9db5..80f2d9fb2 100644 --- a/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o +++ b/pkg/internal/netolly/ebpf/netsk_x86_bpfel.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3746deaaa2b5df4c010273dbaee625518d85e857625d64ddc4327529ef9e773 -size 28368 +oid sha256:5ebb516660ed8a51b745049c455e8dc5006142def51214c93d45bb0fc5ac6010 +size 28544