This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] add caching procs to test suite


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]