This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] add caching procs to test suite
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 01 Aug 2013 18:09:55 +0100
- Subject: Re: [PATCH 4/4] add caching procs to test suite
- References: <1374073124-23602-1-git-send-email-tromey at redhat dot com> <1374073124-23602-5-git-send-email-tromey at redhat dot com>
On 07/17/2013 03:58 PM, Tom Tromey wrote:
> In the fully parallel mode, each .exp file can be run in parallel (at
> least conceptually -- the actual split may not be so severe). This
> means that procs that compute a result and cache it are not going to
> function very well. The test they run will be invoked over and over.
>
> This patch introduces a generic caching mechanism and changes these
> procs to use it.
>
> A caching proc is defined using gdb_caching_proc, which works like
> "proc", except that it caches the result of the body. In parallel
> mode, the cache is kept on disk; it is cleared by the Makefile at the
> start of a test run.
Man, this is neat.
> - # Use the cached value, if it exists. Cache value per "board" to handle
> - # runs with multiple options (e.g. unix/{-m32,-64}) correctly.
Is this not a concern with the new scheme?
> +gdb_caching_proc is_ilp32_target {
> set me "is_ilp32_target"
> - set board [target_info name]
> - if [info exists is_ilp32_target_saved($board)] {
> - verbose "$me: returning saved $is_ilp32_target_saved($board)" 2
> - return $is_ilp32_target_saved($board)
> - }
IMO, if you stripped out the GDB_PARALLEL bits, this
should stand on its own as cleanup, and could go
in first...
--
Pedro Alves