From 10f9aa6cc8d834b40e7666bfc976f01f7a8526f8 Mon Sep 17 00:00:00 2001 From: Valeri Pliskin Date: Wed, 6 Nov 2024 13:38:47 +0000 Subject: [PATCH] rebase fixes --- pkg/gpu/probe.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/gpu/probe.go b/pkg/gpu/probe.go index 592b0ba34677e..fd6e5cdb3517b 100644 --- a/pkg/gpu/probe.go +++ b/pkg/gpu/probe.go @@ -83,9 +83,9 @@ type Probe struct { cfg *config.Config consumer *cudaEventConsumer attacher *uprobes.UprobeAttacher - sysCtx *systemContext statsGenerator *statsGenerator deps ProbeDependencies + sysCtx *systemContext procMon *monitor.ProcessMonitor } @@ -125,7 +125,7 @@ func NewProbe(cfg *config.Config, deps ProbeDependencies) (*Probe, error) { return nil, fmt.Errorf("error creating uprobes attacher: %w", err) } - sysCtx, err := getSystemContext(deps.NvmlLib) + sysCtx, err := getSystemContext(deps.NvmlLib, cfg.ProcRoot) if err != nil { return nil, fmt.Errorf("error getting system context: %w", err) } @@ -136,10 +136,10 @@ func NewProbe(cfg *config.Config, deps ProbeDependencies) (*Probe, error) { attacher: attacher, deps: deps, procMon: procMon, - sysCtx: sysCtx, + sysCtx: sysCtx, } - p.consumer = newCudaEventConsumer(eventHandler, p.cfg) + p.consumer = newCudaEventConsumer(sysCtx, eventHandler, p.cfg) //TODO: decouple this to avoid sharing streamHandlers between consumer and statsGenerator p.statsGenerator = newStatsGenerator(sysCtx, p.consumer.streamHandlers)