public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [3/4] RFC: add DWARF index support
Date: Sun, 04 Jul 2010 18:18:00 -0000	[thread overview]
Message-ID: <20100704181758.GA30603@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3wrtgp2ak.fsf@fleche.redhat.com>

Hi Tom,

OpenOffice.org Fedora-13-x86_64 `thread apply all bt full' did for me:

system =0m9.079s
HEAD   =0m7.671s
noindex=0m7.864s
index  =0m1.811s
(44MB of indexes)

Nice. :-)


On Thu, 01 Jul 2010 00:45:55 +0200, Tom Tromey wrote:
> +/* All offsets in the index are of this type.  It must be
> +   architecture-independent.  */
> +typedef uint32_t offset_type;

It should be 64bit, Fedora already has to carry 64bit obstack patch for >2GB
.debug files. I have seen only an artificial reproducer for >2GB .debug, no
real world case, though.
http://sourceware.org/ml/libc-alpha/2007-01/msg00090.html


> +  if (stat (objfile->name, &obstat) < 0)

dwarf2read.c:1764: error: implicit declaration of function ‘stat’
dwarf2read.c:1771: error: implicit declaration of function ‘fstat’
->
#include <sys/stat.h>


> +static void
> +create_addrmap_from_index (struct objfile *objfile, struct mapped_index *index)
> +      addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr,
> +			 dwarf2_per_objfile->all_comp_units[cu_index]);

addrmap_set_empty has parameter end_inclusive, "hi" is end-exclusive.


> +  filename = concat (dir, "/", lbasename (objfile->name), INDEX_SUFFIX, NULL);

Here is some cross-platform path issue.  Also there should be `(char *) NULL'.


> +   1. The file header.  This is a sequence of values, of offset_type
> +   unless otherwise noted:

I would prefer there some simple magic (for file(1)).


> +   [0] The version number.  Currently 1.
> +   [1] The mtime of the objfile, as a 64-bit little-endian value.

Do you have some specific needs for storing timestamp into the file?
When such index files will be packaged by distros it may create needless
differences across various verifications.  Isn't make(1)-like timestamp
dependency enough?


> +	TRY_CATCH (except, RETURN_MASK_ALL)

Only RETURN_MASK_ERROR probably.


Thanks,
Jan

  reply	other threads:[~2010-07-04 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 22:46 Tom Tromey
2010-07-04 18:18 ` Jan Kratochvil [this message]
2010-07-04 19:28   ` Jan Kratochvil
2010-07-06 16:50   ` Tom Tromey
2010-07-06 17:11     ` Jan Kratochvil
2010-07-06 17:31       ` Tom Tromey
2010-07-06 17:36         ` Jan Kratochvil
2010-07-06 17:35       ` Tom Tromey
2010-07-06 17:37         ` Jan Kratochvil
2010-07-08 17:01       ` Tom Tromey
2010-07-08 18:25         ` Eli Zaretskii
2010-07-08 20:35           ` Tom Tromey
2010-07-08 20:52             ` Eli Zaretskii
2010-07-08 17:02     ` Tom Tromey

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=20100704181758.GA30603@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).