Skip to content

Commit 8069d0c

Browse files
committed
Add prctl monitor
1 parent 2184a6a commit 8069d0c

19 files changed

Lines changed: 1650 additions & 141 deletions

File tree

internal/controller/controller.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ func (c *Controller) Start(ctx context.Context) error {
7777
return fmt.Errorf("failed to parse the included tracers: %w", err)
7878
}
7979

80-
err = c.reporter.Start(ctx)
81-
if err != nil {
82-
return fmt.Errorf("failed to start reporter: %w", err)
83-
}
80+
// err = c.reporter.Start(ctx)
81+
// if err != nil {
82+
// return fmt.Errorf("failed to start reporter: %w", err)
83+
// }
8484

8585
envVars := libpf.Set[string]{}
8686
for envVar := range strings.SplitSeq(c.config.IncludeEnvVars, ",") {
@@ -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)