From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Pedro Alves <palves@redhat.com>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>,
<gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 00/17] Fast tracepoint support for ARMv7
Date: Wed, 29 Jun 2016 19:15:00 -0000 [thread overview]
Message-ID: <wwokwpl76c2u.fsf@ericsson.com> (raw)
In-Reply-To: <0d896cd9-f857-db41-fdb1-2ebde0eeeb01@redhat.com>
Pedro Alves writes:
> On 06/29/2016 02:55 PM, Antoine Tremblay wrote:
>
>>> There is a possible issue while stepping out of the jump pad as discussed
>>> here: https://sourceware.org/ml/gdb-patches/2016-01/msg00673.html
>>>
>>> But this issue is present in x86 with hardware single stepping too. So I
>>> don't think it's related to this series and can be addressed separately.
>>> I'm still mentioning it as it may be relevant while testing software
>>> single stepping out of the jump pad.
>
> I follows that url now, and I didn't see where it's mentioned
> that the issue is present with x86 as well? It talks about
> single-step breakpoints, which x86 doesn't use?
>
Yes the threading is a bit strange, the proper url for x86 reference is
: https://sourceware.org/ml/gdb-patches/2016-02/msg00128.html
> IIRC, Yao's software single-step series fixes several bugs that
> manifest in suspend count assertions failing. Are you working on top
> of that?
>
I was testing on x86...
>>
>> About this possible known issue, after more investigation it turns out
>> this is because my test to try to test moving out of the jump pad is
>> flawed. So there's no reason to believe that the software single step to
>> move out of the jump pad has a problem based on that.
>>
>> The fact that I would stop a thread with a breakpoint inside the
>> jumppad is problematic since even if I removed the breakpoint to
>> simulate that gdb happened to stop there while the process was
>> interrupted gdb still assumes with last_resume_kind that the user wants
>> this thread stopped and thus it fails go through the proper code
>> paths.
>
> If you put a breakpoint inside gdb_collect or one of its callees,
> then gdbserver is supposed to not try to move threads out of the
> jump pads. This is to allow debugging the fast tracepoint machinery
> itself.
>
Yes indeed that's what I discovered.. thus my flawed test.
>>
>> I tried testing the moving out of jump pad logic by running a while loop
>> with only one fast tracepoint collecting there and then interrupting it
>> at random but surprisingly this has some problems.
>>
>> It seems the trace stops on it's own even with buffer size unlimited on
>> x86, I'm not sure if the trace buffer can actually be unlimited so I
>> tested also with circular-buffers on and this that I just can't
>> interrupt the process...
>>
>> Would anyone have an idea on a way to test the move out of the jump pad
>> logic ? Pedro maybe ? Did you have a way to test it when you wrote that
>> code ?
>
> I think I remember doing basically what you did -- run a tight
> loop that is constantly collecting a fast tracepoint, and then send
> the inferior a signal. Then I'd do "bt" and look for a "gdb_collect"
> frame. If one was shown, there was a bug. I remember trying and
> observing all the nasty situations described on top
> of linux_stabilize_threads, but I don't remember ever converting them
> to proper testcases... :-/
>
OK, I guess I have to find a way to interrupt it, in my case using a
circular buffer, trying c& and interrupt as no effect or C-c with
continue...
I'll try a less tight loop and check that's it's in the traced code but
not in the usleep...
In the meantime it made me test arm fast tracepoints with a thight loop
like that and it crashes the inferiror when the agent buffer is full :(
I'll fix that 1st..
Thanks,
Antoine
next prev parent reply other threads:[~2016-06-29 19:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 12:56 Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 06/17] arm-tdep.c: Use relocation visitor in Thumb 16-bits instruction decoding Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 07/17] Move ARM instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 11/17] Use software single step to step out of a fast tracepoint jump pad Antoine Tremblay
2016-06-09 12:56 ` [PATCH v2 08/17] Move Thumb 32 bits instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 01/17] arm-tdep.c: Replace arguments to decode function by a structure Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 13/17] Fast tracepoint support for ARM on Linux Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad Antoine Tremblay
2016-06-15 14:59 ` Marcin Kościelnicki
2016-06-15 15:42 ` Antoine Tremblay
2016-06-16 17:14 ` [PATCH v3] " Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 15/17] arm: Move insn_references_pc to common code Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 14/17] JIT conditions support for ARM tracepoints Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 05/17] arm-tdep.c: Use relocation visitor in Thumb 32-bits instruction decoding Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 09/17] Move Thumb 16 bits instruction decode functions to arch/arm-insn-reloc.c Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 04/17] arm-tdep.c: Use relocation visitor in ARM instruction decoding Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 17/17] arm fast tracepoints: Relocation of Thumb 32-bits instructions Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 12/17] Add ARM/Thumb instruction assembler for fast tracepoints Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 02/17] arm-tdep.c: Refactor displaced stepping relocation functions Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 03/17] arm-tdep.c: Move debug printout from decode to copy function Antoine Tremblay
2016-06-09 12:57 ` [PATCH v2 16/17] arm fast tracepoints: Relocation of ARM instructions Antoine Tremblay
2016-06-29 13:55 ` [PATCH v2 00/17] Fast tracepoint support for ARMv7 Antoine Tremblay
2016-06-29 16:59 ` Pedro Alves
2016-06-29 19:15 ` Antoine Tremblay [this message]
2016-06-29 20:10 ` Pedro Alves
2016-06-30 11:46 ` Antoine Tremblay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wwokwpl76c2u.fsf@ericsson.com \
--to=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox