public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Doug Evans <xdje42@gmail.com>
Cc: "palves@redhat.com" <palves@redhat.com>,
	"dje@google.com"	<dje@google.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 0/6] disasm, record: fix "record instruction-history /m"
Date: Mon, 19 Oct 2015 09:35:00 -0000	[thread overview]
Message-ID: <A78C989F6D9628469189715575E55B2333205FB1@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <CAP9bCMS0rehaE__iBmSVtneS2EFDoOuvWWJOdBqo9U6aBfP6yA@mail.gmail.com>

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Doug Evans
> Sent: Sunday, October 18, 2015 11:17 PM
> To: Metzger, Markus T
> Cc: palves@redhat.com; dje@google.com; gdb-patches@sourceware.org
> Subject: Re: [PATCH 0/6] disasm, record: fix "record instruction-history /m"

Hi Doug,

> > Given the concerns about increased memory consumption and run-time
> > overhead in patch 3 and the changes to the source interleaving algorithm
> > in patches 4 and 5, I'd go with a modified version of my original RFC, i.e.
> >
> >   - patches 1 and 2 from this series
> >   - the rfc patch to interleave sources in record-btrace.c
> >   - patch 6 from this series
> >
> > This will leave us with two source interleaving algorithms, one for a
> > consecutive range of memory, and one for a sequence of instructions
> > in the order in which they were recorded.
> >
> > Both will use a slightly modified dump_insn to print instruction tuples.
> >
> > I'm dropping the idea of preparing a vector of instructions to print and
> > and of trying to shoehorn record instruction-history's source interleaving
> > into do_mixed_source_and_assembly.
> >
> > Does that sound OK?
> 
> I think so (devil is in the details).
> Supporting a vector of instructions sounds fine to me though.
> There doesn't have to be one entry point to the disassembler API.
> [5 would be bad, but 2 is ok: one that takes a range, one that takes a vector.]

Patches 4 and 5 of this series modify the algorithm to make it work for instructions
in random order.  I have to drop the source line hash table, for example, and
perform a much more expensive search.

Also if we don't want to create a temporary vector of instructions, I'd have to
extract the local variables into an iteration state struct and split the algorithm
into small pieces.

It's possible, of course, but I'm afraid you won't recognize your algorithm,
afterwards.

I sent v2 of the series as outlined above.

Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

      reply	other threads:[~2015-10-19  9:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 14:55 Markus Metzger
2015-09-21 14:54 ` [PATCH 1/6] disasm: change dump_insns to print a single instruction Markus Metzger
2015-09-21 14:54 ` [PATCH 6/6] btrace: use gdb_disassembly_vec and new source interleaving method Markus Metzger
2015-09-21 21:48   ` Andrew Burgess
2015-09-22  6:18     ` Metzger, Markus T
2015-09-21 14:54 ` [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction Markus Metzger
2015-10-09 12:51   ` Pedro Alves
2015-10-12  8:44     ` Metzger, Markus T
2015-10-20 11:29       ` Pedro Alves
2015-09-21 14:55 ` [PATCH 4/6] disasm: use entire line table in line_has_code_p Markus Metzger
2015-09-21 14:55 ` [PATCH 3/6] disas: add gdb_disassembly_vec Markus Metzger
2015-10-09 12:49   ` Pedro Alves
2015-10-09 13:17     ` Metzger, Markus T
2015-10-12  8:59       ` Andrew Burgess
2015-10-18 20:39       ` Doug Evans
2015-09-21 14:55 ` [PATCH 5/6] disasm: determine preceding lines independent of last_line Markus Metzger
2015-10-12 14:19 ` [PATCH 0/6] disasm, record: fix "record instruction-history /m" Metzger, Markus T
2015-10-18 21:17   ` Doug Evans
2015-10-19  9:35     ` Metzger, Markus T [this message]

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=A78C989F6D9628469189715575E55B2333205FB1@IRSMSX104.ger.corp.intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=xdje42@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).