rudimentary documentation for the includebloat script
Change-Id: I52209b70b3d93e488e6c9d16fefd179f2ac06afb
This commit is contained in:
@@ -1,4 +1,19 @@
|
|||||||
#!/usr/bin/gawk -f
|
#!/usr/bin/gawk -f
|
||||||
|
# -*- tab-width: 4; indent-tabs-mode: t -*-
|
||||||
|
#
|
||||||
|
# This file is part of the LibreOffice project.
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Generate a list of files included by the C++ compiler during the build
|
||||||
|
# sorted by the total bytes an included file contributed to preprocessor input.
|
||||||
|
# usage: first do a full build with "make check", then run this from $BUILDDIR
|
||||||
|
|
||||||
|
# NOTE: by default gbuild does not generate dependencies for system headers
|
||||||
|
# (in particular the C++ standard library), so those will NOT be counted
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
cmd = "find workdir/Dep/CxxObject/ -name *.d | xargs cat"
|
cmd = "find workdir/Dep/CxxObject/ -name *.d | xargs cat"
|
||||||
@@ -27,8 +42,10 @@ END {
|
|||||||
close(cmd)
|
close(cmd)
|
||||||
}
|
}
|
||||||
PROCINFO["sorted_in"] = "@val_num_desc"
|
PROCINFO["sorted_in"] = "@val_num_desc"
|
||||||
print "sum total bytes included: " totalsize
|
print "sum total bytes included (excluding system headers): " totalsize
|
||||||
for (inc in totals) {
|
for (inc in totals) {
|
||||||
print totals[inc], sizes[inc], includes[inc], inc
|
print totals[inc], sizes[inc], includes[inc], inc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set noet sw=4 ts=4:
|
||||||
|
Reference in New Issue
Block a user