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 640a20c commit 4027a70
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 @@ -225,6 +225,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 @@ -383,7 +384,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 4027a70

Please sign in to comment.