entersyscall will soon be recording in g->sched the pc of its caller, for
use tracing the stack during garbage collection. For that reason it is
important that the caller of entersyscall not return without also calling
exitsyscall. Here, entersyscallblock is calling entersyscall and then
returning, which is not okay.
Please make entersyscallblock an assembly function that does a JMP / B to
the real entersyscall, or else make entersyscallblock a complete copy of
entersyscall.
On 2013/02/20 16:08:54, rsc wrote:
> entersyscall will soon be recording in g->sched the pc of its caller, for
> use tracing the stack during garbage collection. For that reason it is
> important that the caller of entersyscall not return without also calling
> exitsyscall. Here, entersyscallblock is calling entersyscall and then
> returning, which is not okay.
>
> Please make entersyscallblock an assembly function that does a JMP / B to
> the real entersyscall, or else make entersyscallblock a complete copy of
> entersyscall.
I see, I hoped to get away with just #pragma textflag 7 :)
I've made it a complete copy of entersyscall. In the new scheduler their bodies
are mostly different (except the pc/sp saving code), so it will be fine.
On 2013/02/20 16:17:13, dvyukov wrote:
> On 2013/02/20 16:08:54, rsc wrote:
> > entersyscall will soon be recording in g->sched the pc of its caller, for
> > use tracing the stack during garbage collection. For that reason it is
> > important that the caller of entersyscall not return without also calling
> > exitsyscall. Here, entersyscallblock is calling entersyscall and then
> > returning, which is not okay.
> >
> > Please make entersyscallblock an assembly function that does a JMP / B to
> > the real entersyscall, or else make entersyscallblock a complete copy of
> > entersyscall.
>
> I see, I hoped to get away with just #pragma textflag 7 :)
>
> I've made it a complete copy of entersyscall. In the new scheduler their
bodies
> are mostly different (except the pc/sp saving code), so it will be fine.
PTAL
*** Submitted as https://code.google.com/p/go/source/detail?r=d2f4fe93c8d6 *** runtime: introduce entersyscallblock() In preparation for the new scheduler. R=golang-dev, ...
Issue 7386044: code review 7386044: runtime: introduce entersyscallblock()
(Closed)
Created 12 years ago by dvyukov
Modified 12 years ago
Reviewers:
Base URL:
Comments: 0