[GOLD] add new method for computing a build ID (take 2)
Geoff Pike
gpike@chromium.org
Fri Apr 5 07:03:00 GMT 2013
Thanks, Cary.
Re: adding the Hash_tasks during queue_final_tasks(): done.
Re: ">>" for the second echo (multiple places in Makefile.am): done.
Re: my use of mutable: removed.
Re: thread-count-final: Yes, I think it is OK to use that.
Re: the long option names: I left them as they were, but don't feel strongly.
Re: the number of tasks vs the number of threads: I decided to let the
mathematical function to compute be independent of the number of
threads. That way (all else being equal) Alice running with
--thread-count=8 will get the same build ID as Bob running with
--thread-count=4 and Charlie who configured gold with
--disable-threads. I slightly rearranged the logic for my tests (in
Makefile.am) to reflect this.
thanks again,
Geoff
* gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks().
* layout.cc (Hash_task): New class.
(Layout::queue_build_id_tasks): New function.
(Layout::write_build_id): Handle single-thread portion of build ID
computation. (In some cases, all of it is single-threaded.) Replace
{sha1,md5}_process_bytes with {sha1,md5}_buffer to get the same
functionality in fewer lines of code.
* layout.h (Layout::queue_build_id_tasks): New function declaration.
* options.h (General_options): make "--build-id" default to tree
rather than sha1. Add two new options related to --build-id=tree:
--build-id-chunk-size-for-treehash and
--build-id-min-file-size-for-treehash.
* Makefile.am: add testing of --build-id=tree and related new options
(these tests will be invoked by "make check")
* Makefile.in: regenerate
-------------- next part --------------
A non-text attachment was scrubbed...
Name: treehash.patch
Type: application/octet-stream
Size: 37459 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20130405/b2465da9/attachment.obj>
More information about the Binutils
mailing list