aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-28 00:17:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-28 00:17:56 -0400
commit750991f9af5b4019fd0232c23a4815682ff91021 (patch)
tree53e63c096fec4e13c65be4ecf22ac7881ad85e20
parent431f288ed730abfaca5cb73f7e0a2d04459aa65c (diff)
parent289a2d22b5b611d85030795802a710e9f520df29 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner: "A pile of perf related fixes: Kernel: - Fix SLOTS PEBS event constraints for Icelake CPUs - Add the missing mask bit to allow counting hardware generated prefetches on L3 for Icelake CPUs - Make the test for hypervisor platforms more accurate (as far as possible) - Handle PMUs correctly which override event->cpu - Yet another missing fallthrough annotation Tools: perf.data: - Fix loading of compressed data split across adjacent records - Fix buffer size setting for processing CPU topology perf.data header. perf stat: - Fix segfault for event group in repeat mode - Always separate "stalled cycles per insn" line, it was being appended to the "instructions" line. perf script: - Fix --max-blocks man page description. - Improve man page description of metrics. - Fix off by one in brstackinsn IPC computation. perf probe: - Avoid calling freeing routine multiple times for same pointer. perf build: - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings treated as errors, breaking the build" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Mark expected switch fall-throughs perf/core: Fix creating kernel counters for PMUs that override event->cpu perf/x86: Apply more accurate check on hypervisor platform perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register perf/x86/intel: Fix SLOTS PEBS event constraint perf build: Do not use -Wshadow on gcc < 4.8 perf probe: Avoid calling freeing routine multiple times for same pointer perf probe: Set pev->nargs to zero after freeing pev->args entries perf session: Fix loading of compressed data split across adjacent records perf stat: Always separate stalled cycles per insn perf stat: Fix segfault for event group in repeat mode perf tools: Fix proper buffer size for feature processing perf script: Fix off by one in brstackinsn IPC computation perf script: Improve man page description of metrics perf script: Fix --max-blocks man page description
-rw-r--r--arch/x86/events/intel/core.c7
-rw-r--r--arch/x86/events/intel/ds.c2
-rw-r--r--kernel/events/core.c2
-rw-r--r--tools/perf/Documentation/perf-script.txt8
-rw-r--r--tools/perf/builtin-probe.c10
-rw-r--r--tools/perf/builtin-script.c2
-rw-r--r--tools/perf/builtin-stat.c9
-rw-r--r--tools/perf/util/evsel.c2
-rw-r--r--tools/perf/util/header.c2
-rw-r--r--tools/perf/util/probe-event.c1
-rw-r--r--tools/perf/util/session.c22
-rw-r--r--tools/perf/util/session.h1
-rw-r--r--tools/perf/util/stat-shadow.c3
-rw-r--r--tools/perf/util/zstd.c4
-rw-r--r--tools/scripts/Makefile.include9
15 files changed, 59 insertions, 25 deletions
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 62feab0233fa..648260b5f367 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -20,7 +20,6 @@
20#include <asm/intel-family.h> 20#include <asm/intel-family.h>
21#include <asm/apic.h> 21#include <asm/apic.h>
22#include <asm/cpu_device_id.h> 22#include <asm/cpu_device_id.h>
23#include <asm/hypervisor.h>
24 23
25#include "../perf_event.h" 24#include "../perf_event.h"
26 25
@@ -263,8 +262,8 @@ static struct event_constraint intel_icl_event_constraints[] = {
263}; 262};
264 263
265static struct extra_reg intel_icl_extra_regs[] __read_mostly = { 264static struct extra_reg intel_icl_extra_regs[] __read_mostly = {
266 INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x3fffff9fffull, RSP_0), 265 INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x3fffffbfffull, RSP_0),
267 INTEL_UEVENT_EXTRA_REG(0x01bb, MSR_OFFCORE_RSP_1, 0x3fffff9fffull, RSP_1), 266 INTEL_UEVENT_EXTRA_REG(0x01bb, MSR_OFFCORE_RSP_1, 0x3fffffbfffull, RSP_1),
268 INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), 267 INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd),
269 INTEL_UEVENT_EXTRA_REG(0x01c6, MSR_PEBS_FRONTEND, 0x7fff17, FE), 268 INTEL_UEVENT_EXTRA_REG(0x01c6, MSR_PEBS_FRONTEND, 0x7fff17, FE),
270 EVENT_EXTRA_END 269 EVENT_EXTRA_END
@@ -4053,7 +4052,7 @@ static bool check_msr(unsigned long msr, u64 mask)
4053 * Disable the check for real HW, so we don't 4052 * Disable the check for real HW, so we don't
4054 * mess with potentionaly enabled registers: 4053 * mess with potentionaly enabled registers:
4055 */ 4054 */
4056 if (hypervisor_is_type(X86_HYPER_NATIVE)) 4055 if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
4057 return true; 4056 return true;
4058 4057
4059 /* 4058 /*
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 2c8db2c19328..f1269e804e9b 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -851,7 +851,7 @@ struct event_constraint intel_skl_pebs_event_constraints[] = {
851 851
852struct event_constraint intel_icl_pebs_event_constraints[] = { 852struct event_constraint intel_icl_pebs_event_constraints[] = {
853 INTEL_FLAGS_UEVENT_CONSTRAINT(0x1c0, 0x100000000ULL), /* INST_RETIRED.PREC_DIST */ 853 INTEL_FLAGS_UEVENT_CONSTRAINT(0x1c0, 0x100000000ULL), /* INST_RETIRED.PREC_DIST */
854 INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x400000000ULL), /* SLOTS */ 854 INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x800000000ULL), /* SLOTS */
855 855
856 INTEL_PLD_CONSTRAINT(0x1cd, 0xff), /* MEM_TRANS_RETIRED.LOAD_LATENCY */ 856 INTEL_PLD_CONSTRAINT(0x1cd, 0xff), /* MEM_TRANS_RETIRED.LOAD_LATENCY */
857 INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), /* MEM_INST_RETIRED.LOAD */ 857 INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), /* MEM_INST_RETIRED.LOAD */
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 026a14541a38..0463c1151bae 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11274,7 +11274,7 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
11274 goto err_unlock; 11274 goto err_unlock;
11275 } 11275 }
11276 11276
11277 perf_install_in_context(ctx, event, cpu); 11277 perf_install_in_context(ctx, event, event->cpu);
11278 perf_unpin_context(ctx); 11278 perf_unpin_context(ctx);
11279 mutex_unlock(&ctx->mutex); 11279 mutex_unlock(&ctx->mutex);
11280 11280
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index d4e2e18a5881..caaab28f8400 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -228,11 +228,11 @@ OPTIONS
228 228
229 With the metric option perf script can compute metrics for 229 With the metric option perf script can compute metrics for
230 sampling periods, similar to perf stat. This requires 230 sampling periods, similar to perf stat. This requires
231 specifying a group with multiple metrics with the :S option 231 specifying a group with multiple events defining metrics with the :S option
232 for perf record. perf will sample on the first event, and 232 for perf record. perf will sample on the first event, and
233 compute metrics for all the events in the group. Please note 233 print computed metrics for all the events in the group. Please note
234 that the metric computed is averaged over the whole sampling 234 that the metric computed is averaged over the whole sampling
235 period, not just for the sample point. 235 period (since the last sample), not just for the sample point.
236 236
237 For sample events it's possible to display misc field with -F +misc option, 237 For sample events it's possible to display misc field with -F +misc option,
238 following letters are displayed for each bit: 238 following letters are displayed for each bit:
@@ -384,7 +384,7 @@ include::itrace.txt[]
384 perf script --time 0%-10%,30%-40% 384 perf script --time 0%-10%,30%-40%
385 385
386--max-blocks:: 386--max-blocks::
387 Set the maximum number of program blocks to print with brstackasm for 387 Set the maximum number of program blocks to print with brstackinsn for
388 each sample. 388 each sample.
389 389
390--reltime:: 390--reltime::
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 6418782951a4..3d0ffd41fb55 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -698,6 +698,16 @@ __cmd_probe(int argc, const char **argv)
698 698
699 ret = perf_add_probe_events(params.events, params.nevents); 699 ret = perf_add_probe_events(params.events, params.nevents);
700 if (ret < 0) { 700 if (ret < 0) {
701
702 /*
703 * When perf_add_probe_events() fails it calls
704 * cleanup_perf_probe_events(pevs, npevs), i.e.
705 * cleanup_perf_probe_events(params.events, params.nevents), which
706 * will call clear_perf_probe_event(), so set nevents to zero
707 * to avoid cleanup_params() to call clear_perf_probe_event() again
708 * on the same pevs.
709 */
710 params.nevents = 0;
701 pr_err_with_code(" Error: Failed to add events.", ret); 711 pr_err_with_code(" Error: Failed to add events.", ret);
702 return ret; 712 return ret;
703 } 713 }
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8f24865596af..0140ddb8dd0b 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1059,7 +1059,7 @@ static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample,
1059 1059
1060 printed += ip__fprintf_sym(ip, thread, x.cpumode, x.cpu, &lastsym, attr, fp); 1060 printed += ip__fprintf_sym(ip, thread, x.cpumode, x.cpu, &lastsym, attr, fp);
1061 if (ip == end) { 1061 if (ip == end) {
1062 printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, insn, fp, 1062 printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, ++insn, fp,
1063 &total_cycles); 1063 &total_cycles);
1064 if (PRINT_FIELD(SRCCODE)) 1064 if (PRINT_FIELD(SRCCODE))
1065 printed += print_srccode(thread, x.cpumode, ip); 1065 printed += print_srccode(thread, x.cpumode, ip);
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index b55a534b4de0..352cf39d7c2f 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -607,7 +607,13 @@ try_again:
607 * group leaders. 607 * group leaders.
608 */ 608 */
609 read_counters(&(struct timespec) { .tv_nsec = t1-t0 }); 609 read_counters(&(struct timespec) { .tv_nsec = t1-t0 });
610 perf_evlist__close(evsel_list); 610
611 /*
612 * We need to keep evsel_list alive, because it's processed
613 * later the evsel_list will be closed after.
614 */
615 if (!STAT_RECORD)
616 perf_evlist__close(evsel_list);
611 617
612 return WEXITSTATUS(status); 618 return WEXITSTATUS(status);
613} 619}
@@ -1997,6 +2003,7 @@ int cmd_stat(int argc, const char **argv)
1997 perf_session__write_header(perf_stat.session, evsel_list, fd, true); 2003 perf_session__write_header(perf_stat.session, evsel_list, fd, true);
1998 } 2004 }
1999 2005
2006 perf_evlist__close(evsel_list);
2000 perf_session__delete(perf_stat.session); 2007 perf_session__delete(perf_stat.session);
2001 } 2008 }
2002 2009
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index ebb46da4dfe5..52459dd5ad0c 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1291,6 +1291,7 @@ static void perf_evsel__free_id(struct perf_evsel *evsel)
1291 xyarray__delete(evsel->sample_id); 1291 xyarray__delete(evsel->sample_id);
1292 evsel->sample_id = NULL; 1292 evsel->sample_id = NULL;
1293 zfree(&evsel->id); 1293 zfree(&evsel->id);
1294 evsel->ids = 0;
1294} 1295}
1295 1296
1296static void perf_evsel__free_config_terms(struct perf_evsel *evsel) 1297static void perf_evsel__free_config_terms(struct perf_evsel *evsel)
@@ -2077,6 +2078,7 @@ void perf_evsel__close(struct perf_evsel *evsel)
2077 2078
2078 perf_evsel__close_fd(evsel); 2079 perf_evsel__close_fd(evsel);
2079 perf_evsel__free_fd(evsel); 2080 perf_evsel__free_fd(evsel);
2081 perf_evsel__free_id(evsel);
2080} 2082}
2081 2083
2082int perf_evsel__open_per_cpu(struct perf_evsel *evsel, 2084int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index c24db7f4909c..20111f8da5cb 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -3747,7 +3747,7 @@ int perf_event__process_feature(struct perf_session *session,
3747 return 0; 3747 return 0;
3748 3748
3749 ff.buf = (void *)fe->data; 3749 ff.buf = (void *)fe->data;
3750 ff.size = event->header.size - sizeof(event->header); 3750 ff.size = event->header.size - sizeof(*fe);
3751 ff.ph = &session->header; 3751 ff.ph = &session->header;
3752 3752
3753 if (feat_ops[feat].process(&ff, NULL)) 3753 if (feat_ops[feat].process(&ff, NULL))
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index cd1eb73cfe83..8394d48f8b32 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2230,6 +2230,7 @@ void clear_perf_probe_event(struct perf_probe_event *pev)
2230 field = next; 2230 field = next;
2231 } 2231 }
2232 } 2232 }
2233 pev->nargs = 0;
2233 zfree(&pev->args); 2234 zfree(&pev->args);
2234} 2235}
2235 2236
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index d0fd6c614e68..37efa1f43d8b 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -36,10 +36,16 @@ static int perf_session__process_compressed_event(struct perf_session *session,
36 void *src; 36 void *src;
37 size_t decomp_size, src_size; 37 size_t decomp_size, src_size;
38 u64 decomp_last_rem = 0; 38 u64 decomp_last_rem = 0;
39 size_t decomp_len = session->header.env.comp_mmap_len; 39 size_t mmap_len, decomp_len = session->header.env.comp_mmap_len;
40 struct decomp *decomp, *decomp_last = session->decomp_last; 40 struct decomp *decomp, *decomp_last = session->decomp_last;
41 41
42 decomp = mmap(NULL, sizeof(struct decomp) + decomp_len, PROT_READ|PROT_WRITE, 42 if (decomp_last) {
43 decomp_last_rem = decomp_last->size - decomp_last->head;
44 decomp_len += decomp_last_rem;
45 }
46
47 mmap_len = sizeof(struct decomp) + decomp_len;
48 decomp = mmap(NULL, mmap_len, PROT_READ|PROT_WRITE,
43 MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); 49 MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
44 if (decomp == MAP_FAILED) { 50 if (decomp == MAP_FAILED) {
45 pr_err("Couldn't allocate memory for decompression\n"); 51 pr_err("Couldn't allocate memory for decompression\n");
@@ -47,10 +53,10 @@ static int perf_session__process_compressed_event(struct perf_session *session,
47 } 53 }
48 54
49 decomp->file_pos = file_offset; 55 decomp->file_pos = file_offset;
56 decomp->mmap_len = mmap_len;
50 decomp->head = 0; 57 decomp->head = 0;
51 58
52 if (decomp_last) { 59 if (decomp_last_rem) {
53 decomp_last_rem = decomp_last->size - decomp_last->head;
54 memcpy(decomp->data, &(decomp_last->data[decomp_last->head]), decomp_last_rem); 60 memcpy(decomp->data, &(decomp_last->data[decomp_last->head]), decomp_last_rem);
55 decomp->size = decomp_last_rem; 61 decomp->size = decomp_last_rem;
56 } 62 }
@@ -61,7 +67,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
61 decomp_size = zstd_decompress_stream(&(session->zstd_data), src, src_size, 67 decomp_size = zstd_decompress_stream(&(session->zstd_data), src, src_size,
62 &(decomp->data[decomp_last_rem]), decomp_len - decomp_last_rem); 68 &(decomp->data[decomp_last_rem]), decomp_len - decomp_last_rem);
63 if (!decomp_size) { 69 if (!decomp_size) {
64 munmap(decomp, sizeof(struct decomp) + decomp_len); 70 munmap(decomp, mmap_len);
65 pr_err("Couldn't decompress data\n"); 71 pr_err("Couldn't decompress data\n");
66 return -1; 72 return -1;
67 } 73 }
@@ -255,15 +261,15 @@ static void perf_session__delete_threads(struct perf_session *session)
255static void perf_session__release_decomp_events(struct perf_session *session) 261static void perf_session__release_decomp_events(struct perf_session *session)
256{ 262{
257 struct decomp *next, *decomp; 263 struct decomp *next, *decomp;
258 size_t decomp_len; 264 size_t mmap_len;
259 next = session->decomp; 265 next = session->decomp;
260 decomp_len = session->header.env.comp_mmap_len;
261 do { 266 do {
262 decomp = next; 267 decomp = next;
263 if (decomp == NULL) 268 if (decomp == NULL)
264 break; 269 break;
265 next = decomp->next; 270 next = decomp->next;
266 munmap(decomp, decomp_len + sizeof(struct decomp)); 271 mmap_len = decomp->mmap_len;
272 munmap(decomp, mmap_len);
267 } while (1); 273 } while (1);
268} 274}
269 275
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index dd8920b745bc..863dbad87849 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -46,6 +46,7 @@ struct perf_session {
46struct decomp { 46struct decomp {
47 struct decomp *next; 47 struct decomp *next;
48 u64 file_pos; 48 u64 file_pos;
49 size_t mmap_len;
49 u64 head; 50 u64 head;
50 size_t size; 51 size_t size;
51 char data[]; 52 char data[];
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index 656065af4971..accb1bf1cfd8 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -819,7 +819,8 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
819 "stalled cycles per insn", 819 "stalled cycles per insn",
820 ratio); 820 ratio);
821 } else if (have_frontend_stalled) { 821 } else if (have_frontend_stalled) {
822 print_metric(config, ctxp, NULL, NULL, 822 out->new_line(config, ctxp);
823 print_metric(config, ctxp, NULL, "%7.2f ",
823 "stalled cycles per insn", 0); 824 "stalled cycles per insn", 0);
824 } 825 }
825 } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES)) { 826 } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES)) {
diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
index 23bdb9884576..d2202392ffdb 100644
--- a/tools/perf/util/zstd.c
+++ b/tools/perf/util/zstd.c
@@ -99,8 +99,8 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
99 while (input.pos < input.size) { 99 while (input.pos < input.size) {
100 ret = ZSTD_decompressStream(data->dstream, &output, &input); 100 ret = ZSTD_decompressStream(data->dstream, &output, &input);
101 if (ZSTD_isError(ret)) { 101 if (ZSTD_isError(ret)) {
102 pr_err("failed to decompress (B): %ld -> %ld : %s\n", 102 pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
103 src_size, output.size, ZSTD_getErrorName(ret)); 103 src_size, output.size, dst_size, ZSTD_getErrorName(ret));
104 break; 104 break;
105 } 105 }
106 output.dst = dst + output.pos; 106 output.dst = dst + output.pos;
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 495066bafbe3..ded7a950dc40 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -32,7 +32,6 @@ EXTRA_WARNINGS += -Wno-system-headers
32EXTRA_WARNINGS += -Wold-style-definition 32EXTRA_WARNINGS += -Wold-style-definition
33EXTRA_WARNINGS += -Wpacked 33EXTRA_WARNINGS += -Wpacked
34EXTRA_WARNINGS += -Wredundant-decls 34EXTRA_WARNINGS += -Wredundant-decls
35EXTRA_WARNINGS += -Wshadow
36EXTRA_WARNINGS += -Wstrict-prototypes 35EXTRA_WARNINGS += -Wstrict-prototypes
37EXTRA_WARNINGS += -Wswitch-default 36EXTRA_WARNINGS += -Wswitch-default
38EXTRA_WARNINGS += -Wswitch-enum 37EXTRA_WARNINGS += -Wswitch-enum
@@ -69,8 +68,16 @@ endif
69# will do for now and keep the above -Wstrict-aliasing=3 in place 68# will do for now and keep the above -Wstrict-aliasing=3 in place
70# in newer systems. 69# in newer systems.
71# Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h 70# Needed for the __raw_cmpxchg in tools/arch/x86/include/asm/cmpxchg.h
71#
72# See https://lkml.org/lkml/2006/11/28/253 and https://gcc.gnu.org/gcc-4.8/changes.html,
73# that takes into account Linus's comments (search for Wshadow) for the reasoning about
74# -Wshadow not being interesting before gcc 4.8.
75
72ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3 76ifneq ($(filter 3.%,$(MAKE_VERSION)),) # make-3
73EXTRA_WARNINGS += -fno-strict-aliasing 77EXTRA_WARNINGS += -fno-strict-aliasing
78EXTRA_WARNINGS += -Wno-shadow
79else
80EXTRA_WARNINGS += -Wshadow
74endif 81endif
75 82
76ifneq ($(findstring $(MAKEFLAGS), w),w) 83ifneq ($(findstring $(MAKEFLAGS), w),w)