Skip to content

Commit

Permalink
Try locking the OS thread
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
  • Loading branch information
kakkoyun committed Apr 21, 2022
1 parent b16278c commit d0f6be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/profiler/profiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func (p *CgroupProfiler) Labels() model.LabelSet {

func (p *CgroupProfiler) Run(ctx context.Context) error {
level.Debug(p.logger).Log("msg", "starting cgroup profiler")
runtime.LockOSThread()

p.mtx.Lock()
ctx, p.cancel = context.WithCancel(ctx)
Expand Down Expand Up @@ -381,7 +382,6 @@ func (p *CgroupProfiler) profileLoop(ctx context.Context, captureTime time.Time)
return nil
}
level.Debug(p.logger).Log("msg", "fetching stack trace counts in batch", "batchSize", batchSize)
time.Sleep(1 * time.Second)

var (
values [][]byte
Expand Down

0 comments on commit d0f6be8

Please sign in to comment.