This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 17/17] infrun: scheduler-locking reverse
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 17 Sep 2015 10:38:56 +0200
- Subject: Re: [PATCH 17/17] infrun: scheduler-locking reverse
- Authentication-results: sourceware.org; auth=none
- References: <1441794909-32718-1-git-send-email-markus dot t dot metzger at intel dot com> <1441794909-32718-18-git-send-email-markus dot t dot metzger at intel dot com> <55F03A12 dot 80307 at redhat dot com> <20150912194344 dot GA7575 at host1 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B23331AE05D at IRSMSX104 dot ger dot corp dot intel dot com> <20150915171931 dot GA2056 at host1 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B23331AE557 at IRSMSX104 dot ger dot corp dot intel dot com>
Hello Markus,
On Wed, 16 Sep 2015 09:59:23 +0200, Metzger, Markus T wrote:
> > If I/we make schedlock_step the default then this code of your patch gets
> > disabled:
> >
> > + else if ((scheduler_mode == schedlock_reverse)
> > + && ((execution_direction == EXEC_REVERSE)
> > + || target_record_is_replaying (minus_one_ptid)))
> > + {
> > + /* User-settable 'scheduler' mode requires solo thread resume during
> > + reverse/replay stepping. */
> > + resume_ptid = inferior_ptid;
> > + }
>
> Yes. But the code above this in infrun.c then applies:
>
> else if ((scheduler_mode == schedlock_on)
> || (scheduler_mode == schedlock_step && step))
> {
> /* User-settable 'scheduler' mode requires solo thread
> resume. */
> resume_ptid = inferior_ptid;
> }
OK, I get it now. I misunderstood it all despite word by word the new
description is right. I would suggest changing the proposed:
off == no locking (threads may preempt at any time)\n\
on == full locking (no thread except the current thread may run)\n\
step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
reverse == scheduler locked during reverse/replay execution.\n\
to:
off == no locking (threads may preempt at any time)\n\
on == full locking (no thread except the current thread may run)\n\
This applies to both normal and reverse/replay execution.\n\
step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
This applies to both normal and reverse/replay execution.\n\
reverse == scheduler fully locked only during reverse/replay execution.\n\
And even gdb.texinfo somehow accordingly.
Thanks,
Jan