is stop the world and restart the world overhead expensive?

87 views
Skip to first unread message

杨杰

unread,
Jul 1, 2024, 8:45:57 AM (yesterday) Jul 1
to golang-nuts
i implement an goroutine profile which use frame pointer to get traceback.

it need stop and restart the world with 100hz.

is this operation expensive?

Ian Lance Taylor

unread,
Jul 1, 2024, 11:15:37 AM (yesterday) Jul 1
to 杨杰, golang-nuts
On Mon, Jul 1, 2024 at 5:45 AM 杨杰 <zdyj317...@gmail.com> wrote:
>
> i implement an goroutine profile which use frame pointer to get traceback.
>
> it need stop and restart the world with 100hz.
>
> is this operation expensive?

Yes.

Since the concern is profiling, I'll note that it will also
significantly affect the program's behavior, so a profile that is
constantly stopping and starting the world may not be a good
reflection of the performance of the program when that is not
happening.

Ian
Reply all
Reply to author
Forward
0 new messages