Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3] Add DWARF index cache
Date: Wed, 25 Jul 2018 18:48:00 -0000	[thread overview]
Message-ID: <87in5317b1.fsf@tromey.com> (raw)
In-Reply-To: <1531173351-6351-4-git-send-email-simon.marchi@ericsson.com>	(Simon Marchi's message of "Mon, 9 Jul 2018 17:55:51 -0400")

>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:

Simon> - The cache is disabled by default.  I think once it's been out there
Simon>   and tested for a while, it could be turned on by default, so that
Simon>   everybody can enjoy it.

I think the patch to enable it should also come with a patch to disable
it in the test suite, since otherwise "make check" is going to fill up
the cache and maybe have other unintended consequences.

Simon> +static void
Simon> +set_index_cache_command (const char *arg, int from_tty)
Simon> +{
Simon> +  printf_unfiltered ("\
Simon> +Missing arguments.  See \"help set index-cache\" for help.\n");

This probably needs _().  I think there were a couple other
(non-debug-print) cases of this as well.

Simon> +  printf_unfiltered ("The index cache is currently %s.\n",
Simon> +		   global_index_cache.enabled () ? "enabled" : "disabled");

Like here.

Simon> +static void
Simon> +test_mkdir_recursive ()
Simon> +{
Simon> +  char base[] = "/tmp/gdb-selftests-XXXXXX";
Simon> +
Simon> +  if (mkdtemp (base) == NULL)
Simon> +    perror_with_name ("mkdtemp");
Simon> +
Simon> +  std::string dir = string_printf ("%s/a/b", base);
Simon> +  SELF_CHECK (create_dir_and_check (dir.c_str ()));
Simon> +
Simon> +  dir = string_printf ("%s/a/b/c//d/e/", base);
Simon> +  SELF_CHECK (create_dir_and_check (dir.c_str ()));

It would be nice to clean up afterward.

Simon> diff --git a/gdb/dwarf-index-write.h b/gdb/dwarf-index-write.h
[...]
Simon> +void write_psymtabs_to_index (struct dwarf2_per_objfile *dwarf2_per_objfile,
Simon> +			      const char *dir, const char *basename,
Simon> +			      dw_index_kind index_kind);

I tend to prefer the explicit "extern" but I don't know if there's an
official style.


This patch seems fine to me and I like this feature -- I would use it
for sure.

I think it needs a doc + NEWS patch.

I think it would be good to file bugs for the future features you
mentioned in the email.

Tom


  parent reply	other threads:[~2018-07-25 18:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 21:56 [PATCH 0/3] Add a " Simon Marchi
2018-07-09 21:56 ` [PATCH 2/3] Introduce scoped_mmapped_file Simon Marchi
2018-07-24  2:18   ` Tom Tromey
2018-07-24 12:31     ` Simon Marchi
2018-07-09 21:56 ` [PATCH 1/3] Make index reading functions more modular Simon Marchi
2018-07-25 16:51   ` Tom Tromey
2018-07-09 21:57 ` [PATCH 3/3] Add DWARF index cache Simon Marchi
2018-07-17 19:48   ` Tom Tromey
2018-07-17 20:48     ` Simon Marchi
2018-07-18 18:20       ` Tom Tromey
2018-07-25 18:48   ` Tom Tromey [this message]
2018-07-25 20:20     ` Simon Marchi
2018-07-26 12:38     ` Simon Marchi

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=87in5317b1.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.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