Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/3] gdb: Improve cache matching criteria for the bfd cache.
Date: Mon, 17 Aug 2015 17:34:00 -0000	[thread overview]
Message-ID: <55D21B18.5000002@redhat.com> (raw)
In-Reply-To: <b02704260b44396f657791907c51826ea9b495dd.1439454670.git.andrew.burgess@embecosm.com>

On 08/13/2015 01:44 PM, Andrew Burgess wrote:
> Within gdb open bfd objects are reused where possible if an attempt is
> made to reopen a file that is already being debugged.  To spot if the on
> disc file has changed gdb currently examines the mtime of the file and
> compares it to the mtime of the open bfd in the cache.
> 
> A problem exists when the on disc file is being rapidly regenerated, as
> happens, for example, with automated testing.  In some cases the file is
> generated so quickly that the mtime appears not to change, while the on
> disc file has changed.
> 
> This patch extends the bfd cache to also hold the file size of the file,
> the inode of the file, and the device id of the file; gdb can then
> compare filename, file size, mtime, inode, and device id to determine if
> an existing bfd object can be reused.
> 
> gdb/ChangeLog:
> 
> 	* gdb_bfd.c (struct gdb_bfd_data): Add size, inode, and device id
> 	field.
> 	(struct gdb_bfd_cache_search): Likewise.
> 	(eq_bfd): Compare the size, inode, and device id fields.
> 	(gdb_bfd_open): Initialise the size, inode, and device id fields.
> 	(gdb_bfd_ref): Likewise.
> 	(gdb_bfd_unref): Likewise.

OK.

Thanks,
Pedro Alves


  reply	other threads:[~2015-08-17 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 12:45 [PATCH v2 0/3] bfd cache: tighten match criteria and debug commands Andrew Burgess
2015-08-13 12:45 ` [PATCH v2 2/3] gdb: New maintenance command to disable bfd sharing Andrew Burgess
2015-08-13 14:24   ` Eli Zaretskii
2015-08-17 17:34   ` Pedro Alves
2015-08-13 12:45 ` [PATCH v2 1/3] gdb: Improve cache matching criteria for the bfd cache Andrew Burgess
2015-08-17 17:34   ` Pedro Alves [this message]
2015-08-13 12:45 ` [PATCH v2 3/3] gdb: Add debug tracing for bfd cache activity Andrew Burgess
2015-08-17 17:34   ` Pedro Alves

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=55D21B18.5000002@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /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