Skip to content

Commit b2ac7c2

Browse files
committed
Add prctl monitor
1 parent 0d29a15 commit b2ac7c2

19 files changed

Lines changed: 1647 additions & 137 deletions

File tree

internal/controller/controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ func (c *Controller) Start(ctx context.Context) error {
160160
// So if you change this log line update also the system test.
161161
log.Info("Attached sched monitor")
162162

163+
if err := trc.AttachPrctlMonitor(); err != nil {
164+
return fmt.Errorf("failed to attach prctl monitor: %w", err)
165+
}
166+
log.Info("Attached prctl monitor")
167+
163168
if err := c.startTraceHandling(ctx, trc); err != nil {
164169
return fmt.Errorf("failed to start trace handling: %w", err)
165170
}

interpreter/threadcontext/integrationtests/testdata/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ all: $(BINARIES)
3333
clean:
3434
rm -f $(BINARIES)
3535

36-
threadctx_exe_glibc: threadctx.c threadctx_lib.c threadctx_lib.h
37-
$(GCC) -mtls-dialect=$(TLS_DIALECT) -o $@ $< threadctx_lib.c
36+
threadctx_exe_glibc: threadctx.c threadctx_lib.c threadctx_lib.h otel_process_ctx.c otel_process_ctx.h
37+
$(GCC) -mtls-dialect=$(TLS_DIALECT) -o $@ $< threadctx_lib.c otel_process_ctx.c
3838

39-
threadctx_exe_musl: threadctx.c threadctx_lib.c threadctx_lib.h
40-
$(MUSL_GCC) -mtls-dialect=$(TLS_DIALECT) -o $@ $< threadctx_lib.c -static
39+
threadctx_exe_musl: threadctx.c threadctx_lib.c threadctx_lib.h otel_process_ctx.c otel_process_ctx.h
40+
$(MUSL_GCC) -mtls-dialect=$(TLS_DIALECT) -o $@ $< threadctx_lib.c otel_process_ctx.c -static
4141

42-
libthreadctx_glibc.so: threadctx_lib.c threadctx_lib.h
43-
$(GCC) -shared -fPIC -mtls-dialect=$(TLS_DIALECT) -o $@ $<
42+
libthreadctx_glibc.so: threadctx_lib.c threadctx_lib.h otel_process_ctx.c otel_process_ctx.h
43+
$(GCC) -shared -fPIC -mtls-dialect=$(TLS_DIALECT) -o $@ $< otel_process_ctx.c
4444

45-
libthreadctx_musl.so: threadctx_lib.c threadctx_lib.h
46-
$(MUSL_GCC) -shared -fPIC -mtls-dialect=$(TLS_DIALECT) -o $@ $<
45+
libthreadctx_musl.so: threadctx_lib.c threadctx_lib.h otel_process_ctx.c otel_process_ctx.h
46+
$(MUSL_GCC) -shared -fPIC -mtls-dialect=$(TLS_DIALECT) -o $@ $< otel_process_ctx.c
4747

4848
threadctx_lib_glibc: threadctx.c threadctx_lib.h libthreadctx_glibc.so
4949
$(GCC) -o $@ $< -L. -lthreadctx_glibc -Wl,-rpath='$$ORIGIN'

0 commit comments

Comments
 (0)