History

Merge tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc updates from Andrew Morton: "Updates to various subsystems which I help look after. lib, ocfs2, fatfs, autofs, squashfs, procfs, etc. A relatively small amount of material this time" * tag 'mm-nonmm-stable-2022-08-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (72 commits) scripts/gdb: ensure the absolute path is generated on initial source MAINTAINERS: kunit: add David Gow as a maintainer of KUnit mailmap: add linux.dev alias for Brendan Higgins mailmap: update Kirill's email profile: setup_profiling_timer() is moslty not implemented ocfs2: fix a typo in a comment ocfs2: use the bitmap API to simplify code ocfs2: remove some useless functions lib/mpi: fix typo 'the the' in comment proc: add some (hopefully) insightful comments bdi: remove enum wb_congested_state kernel/hung_task: fix address space of proc_dohung_task_timeout_secs lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t() squashfs: support reading fragments in readahead call squashfs: implement readahead squashfs: always build "file direct" version of page actor Revert "squashfs: provide backing_dev_info in order to disable read-ahead" fs/ocfs2: Fix spelling typo in comment ia64: old_rr4 added under CONFIG_HUGETLB_PAGE proc: fix test for "vsyscall=xonly" boot option ...

Linus Torvalds committed 4 years ago

Commit eb5699b2 parents b5a8466 b996955102 files · +1313 −724Browse files

Showing the changes to scripts (3 of 102 files). Show all

Unified · Split

3 files
  1. scripts/bloat-o-meter +27 −20
  2. scripts/checkpatch.pl +3 −2
  3. scripts/gdb/vmlinux-gdb.py +1 −1
scripts/bloat-o-meter+27−20
@@ -7,24 +7,31 @@ · 6 unmodified lines
77 # This software may be used and distributed according to the terms
88 # of the GNU General Public License, incorporated herein by reference.
99
10−import sys, os, re
10+import sys, os, re, argparse
1111 from signal import signal, SIGPIPE, SIG_DFL
1212
1313 signal(SIGPIPE, SIG_DFL)
1414
15−if len(sys.argv) < 3:
16− sys.stderr.write("usage: %s [option] file1 file2\n" % sys.argv[0])
17− sys.stderr.write("The options are:\n")
18− sys.stderr.write("-c categorize output based on symbol type\n")
19− sys.stderr.write("-d Show delta of Data Section\n")
20− sys.stderr.write("-t Show delta of text Section\n")
21− sys.exit(-1)
15+parser = argparse.ArgumentParser(description="Simple script used to compare the symbol sizes of 2 object files")
16+group = parser.add_mutually_exclusive_group()
17+group.add_argument('-c', help='categorize output based on symbol type', action='store_true')
18+group.add_argument('-d', help='Show delta of Data Section', action='store_true')
19+group.add_argument('-t', help='Show delta of text Section', action='store_true')
20+parser.add_argument('-p', dest='prefix', help='Arch prefix for the tool being used. Useful in cross build scenarios')
21+parser.add_argument('file1', help='First file to compare')
22+parser.add_argument('file2', help='Second file to compare')
23+
24+args = parser.parse_args()
2225
2326 re_NUMBER = re.compile(r'\.[0-9]+')
2427
2528 def getsizes(file, format):
2629 sym = {}
27− with os.popen("nm --size-sort " + file) as f:
30+ nm = "nm"
31+ if args.prefix:
32+ nm = "{}nm".format(args.prefix)
33+
34+ with os.popen("{} --size-sort {}".format(nm, file)) as f:
2835 for line in f:
2936 if line.startswith("\n") or ":" in line:
3037 continue
@@ -77,9 +84,9 @@ def calc(oldfile, newfile, format): · 46 unmodified lines
7784 delta.reverse()
7885 return grow, shrink, add, remove, up, down, delta, old, new, otot, ntot
7986
80−def print_result(symboltype, symbolformat, argc):
87+def print_result(symboltype, symbolformat):
8188 grow, shrink, add, remove, up, down, delta, old, new, otot, ntot = \
82− calc(sys.argv[argc - 1], sys.argv[argc], symbolformat)
89+ calc(args.file1, args.file2, symbolformat)
8390
8491 print("add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
8592 (add, remove, grow, shrink, up, -down, up-down))
@@ -93,13 +100,13 @@ def print_result(symboltype, symbolformat, argc): · 7 unmodified lines
93100 percent = 0
94101 print("Total: Before=%d, After=%d, chg %+.2f%%" % (otot, ntot, percent))
95102
96−if sys.argv[1] == "-c":
97− print_result("Function", "tT", 3)
98− print_result("Data", "dDbB", 3)
99− print_result("RO Data", "rR", 3)
100−elif sys.argv[1] == "-d":
101− print_result("Data", "dDbBrR", 3)
102−elif sys.argv[1] == "-t":
103− print_result("Function", "tT", 3)
103+if args.c:
104+ print_result("Function", "tT")
105+ print_result("Data", "dDbB")
106+ print_result("RO Data", "rR")
107+elif args.d:
108+ print_result("Data", "dDbBrR")
109+elif args.t:
110+ print_result("Function", "tT")
104111 else:
105− print_result("Function", "tTdDbBrR", 2)
112+ print_result("Function", "tTdDbBrR")
scripts/checkpatch.pl+3−2
@@ -1042,7 +1042,8 @@ our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)}; · 1041 unmodified lines
10421042 our $declaration_macros = qr{(?x:
10431043 (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
10441044 (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(|
1045− (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(
1045+ (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(|
1046+ (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(
10461047 )};
10471048
10481049 our %allow_repeated_words = (
@@ -5720,7 +5721,7 @@ sub process { · 4671 unmodified lines
57205721 $var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ &&
57215722 #Ignore some three character SI units explicitly, like MiB and KHz
57225723 $var !~ /^(?:[a-z_]*?)_?(?:[KMGT]iB|[KMGT]?Hz)(?:_[a-z_]+)?$/) {
5723− while ($var =~ m{($Ident)}g) {
5724+ while ($var =~ m{\b($Ident)}g) {
57245725 my $word = $1;
57255726 next if ($word !~ /[A-Z][a-z]|[a-z][A-Z]/);
57265727 if ($check) {
scripts/gdb/vmlinux-gdb.py+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313
1414 import os
1515
16−sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb")
16+sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/scripts/gdb")
1717
1818 try:
1919 gdb.parse_and_eval("0")