From: Pedro Alves <palves@redhat.com>
To: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>,
gdb-patches@sourceware.org
Cc: uweigand@de.ibm.com, edjunior@gmail.com
Subject: Re: [PATCH v4 10/12] [PowerPC] Add support for EBB and PMU registers
Date: Thu, 16 Aug 2018 16:51:00 -0000 [thread overview]
Message-ID: <5c9f286a-8289-7984-c256-d19af8f797b5@redhat.com> (raw)
In-Reply-To: <20180815000608.26840-11-pedromfc@linux.ibm.com>
On 08/15/2018 01:06 AM, Pedro Franco de Carvalho wrote:
> From: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
>
> This patch adds support for registers of the Event Based Branching and
> Performance Monitoring Units for the powerpc linux native and core
> file targets, and for the powerpc linux server stub.
>
> All three EBB registers are accessible. Only a subset of the PMU
> registers can be accessed through ptrace. Because of this, the PMU
> registers are enumerated individually in gdbarch_tdep, as opposed to
> having a single "have_pmu" flag. This is intended to make it easier
> to add additional PMU registers in the future, since checking a
> "have_pmu" flag elsewhere in the code would no longer be correct. The
> tdesc feature is named org.gnu.gdb.power.linux.pmu because of this.
>
> It's unclear if it makes sense to save and restore these registers
> across function calls, since some of them can be modified
> asynchronously. They are also not tracked in record-replay mode.
>
> The kernel can return ENODATA when ptrace is used to get the EBB
> registers, unless a linux performance event that uses EBB is open in
> the inferior. For this reason, the "fill" functions in the server
> stub for the ebb register sets is not implemented.
>
> Since gdbserver writes all registers in one go before resuming the
> inferior, this error would not be detected at the time the user tries
> to write to one of the registers on the client side, and gdbserver
> would print out warnings every time it resumes the inferior when no
> ebb performance event is opened, so there is currently no
> straightforward way to handle this case. This means the ebb registers
> in the client-side regcache can become dirty when the user tries to
> write to them, until the inferior is resumed and stopped again.
Should we make gdbserver flush the regcache after handling 'G' and 'P'
packets?
>
> Another limitation for the ebb registers is that traceframes don't
> record if registers are available or not, so if these registers are
> collected when a tracepoint is hit and the inferior has no ebb event
> opened, the user will see zero values for all of them, instead of the
> usual <unavailable>.
That'd be nice to fix somehow, at some point.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-08-16 16:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 0:07 [PATCH v4 00/12] GDB support for more powerpc registers on linux Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 10/12] [PowerPC] Add support for EBB and PMU registers Pedro Franco de Carvalho
2018-08-16 16:51 ` Pedro Alves [this message]
2018-08-16 18:16 ` Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 01/12] Zero-initialize linux note sections Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 02/12] [PowerPC] Don't zero-initialize vector register buffers Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 07/12] [PowerPC] Refactor have_ initializers in rs6000-tdep.c Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 05/12] [PowerPC] Fix two if statements in gdb/ppc-linux-nat.c Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 04/12] [PowerPC] Remove rs6000_pseudo_register_reggroup_p Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 09/12] [PowerPC] Add support for TAR Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 11/12] [PowerPC] Reject tdescs with VSX and no FPU or Altivec Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 03/12] Add decfloat registers to float reggroup Pedro Franco de Carvalho
2018-08-15 0:07 ` [PATCH v4 06/12] [PowerPC] Fix indentation in arch/ppc-linux-common.c Pedro Franco de Carvalho
2018-08-15 0:55 ` [PATCH v4 12/12] [PowerPC] Add support for HTM registers Pedro Franco de Carvalho
2018-08-16 16:53 ` Pedro Alves
2018-08-16 17:50 ` Pedro Franco de Carvalho
2018-08-16 20:16 ` Pedro Franco de Carvalho
2018-08-16 23:47 ` Pedro Franco de Carvalho
2018-08-17 18:11 ` Pedro Alves
2018-08-17 19:25 ` Pedro Franco de Carvalho
2018-08-15 1:16 ` [PATCH v4 08/12] [PowerPC] Add support for PPR and DSCR Pedro Franco de Carvalho
2018-08-16 16:46 ` [PATCH v4 00/12] GDB support for more powerpc registers on linux Pedro Franco de Carvalho
2018-08-16 17:00 ` Pedro Alves
2018-08-16 17:42 ` Pedro Franco de Carvalho
2018-08-16 18:02 ` Eli Zaretskii
2018-08-16 18:08 ` Pedro Franco de Carvalho
2018-08-16 18:45 ` Eli Zaretskii
2018-08-16 19:23 ` Pedro Franco de Carvalho
2018-10-08 19:09 ` ping: " Jan Kratochvil
2018-10-08 19:32 ` Pedro Franco de Carvalho
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=5c9f286a-8289-7984-c256-d19af8f797b5@redhat.com \
--to=palves@redhat.com \
--cc=edjunior@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=pedromfc@linux.ibm.com \
--cc=uweigand@de.ibm.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