Re: include-what-you-use results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 25 Aug 2018, Sage Weil wrote:
> On Thu, 23 Aug 2018, Noah Watkins wrote:
> > I managed to get Ceph built this afternoon using the
> > include-what-you-use tool that attempts to optimize #includes.
> > 
> > The results are in the gist below. There is a lot of noise...
> > 
> >   https://gist.github.com/noahdesu/92e36c85658d29d4a45542e86127915f
> > 
> > ... but sifting through, there seems to be some good stuff. Here is an
> > example where it notices that only a forward declaration is needed for
> > bufferlist:
> > 
> > /home/nwatkins/src/ceph-iwyu/src/common/DecayCounter.h should add these lines:
> > #include <string> // for operator<<
> > #include "include/buffer_fwd.h" // for bufferlist
> > namespace ceph { class Formatter; }
> > 
> > /home/nwatkins/src/ceph-iwyu/src/common/DecayCounter.h should remove
> > these lines:
> > - #include "common/Formatter.h" // lines 19-19
> > - #include "include/buffer.h" // lines 18-18
> > 
> > 
> 
> Is that output from running on the whole tree, or just a few source files?  
> I would have expected more proposed changes.

Hah, nevermind, the flaky airplane internet cut it off at ~300 lines.  
Now I see the whole thing.

This looks like a pretty time consuming project to sift through these and 
apply the changes that make sense.  I would hopefully have some positive 
impact on build times, though!

s




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux