perf/urgent fix:

User visible changes:
 
   - Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
     in an array used just for printing available events, robustify the code
     involved (Arnaldo Carvalho de Melo)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWcgcYAAoJENZQFvNTUqpAsCUQALQhBTj1vYyEivBmLJaVaAlg
 2v+QVO1G7LKvzl7ze+s67mPMT0m/wScQrmPaFBGdLQYOZJGrYoIOeSVn+ojt8Ztj
 hUEbshb5Ik+SB78f/+6ZmD7RCWRiwrpAaIz627F4i7y2cOxnyCFu431kBuPO1oJx
 D7b9ZW0e3AY7VV8Vtd9vBtA0GEezo97DxKOqR8pEVU6mRaI0G+R5O4lnHe+fH7RT
 8zhrAa0uRdN00W3uP584z04RLfRnFcpwZWolvVFyXYY5fzMLkus9BSYPcDWh+GMy
 gPtH6k2zN1lgrn87PEuMOOQ/bkWKmxL7LUiSWJE+acl6AzQ+mYPTOQNPMKfYnF0d
 xVgNfEcvlu0ThRo+/DlTr2OZGPGXERQV4RvhrBQqCyntxL+cp+iDaxiAZPzttSWN
 UwvcSioIMNZ5v+5G9pQSphTINnVzpBQQduFDPsZCl4JvRTgEoFCKXaMVcmABRTsL
 CfwcsRY3v1Ki/6ffzA7yjzvb8wDH2+gFBqLTt/U00UYSYwa8vSutyMyfXA0pIndM
 kh+jBGfY5uU3PfWrzDX+BQLMOJiOcnkZjgbWGTNpanRw8gmsnhy9pZoGXs7CM8Sy
 9976/lC+sDbmA37hajUKE7HNYDQy4Td+YQ7pKD8k3bCYzGYPw/ppCt87FLvLntPN
 KSoWfPp7ITWjMXMCMWdv
 =8MPk
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent tooling fix from Arnaldo Carvalho de Melo:

  User visible changes:

    - Fix 'perf list' segfault due to lack of support for PERF_CONF_SW_BPF_OUTPUT
      in an array used just for printing available events, robustify the code
      involved (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2015-12-18 09:40:13 +01:00
commit 2d2e7ac14a

View File

@ -124,6 +124,10 @@ struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = {
.symbol = "dummy",
.alias = "",
},
[PERF_COUNT_SW_BPF_OUTPUT] = {
.symbol = "bpf-output",
.alias = "",
},
};
#define __PERF_EVENT_FIELD(config, name) \
@ -1879,7 +1883,7 @@ restart:
for (i = 0; i < max; i++, syms++) {
if (event_glob != NULL &&
if (event_glob != NULL && syms->symbol != NULL &&
!(strglobmatch(syms->symbol, event_glob) ||
(syms->alias && strglobmatch(syms->alias, event_glob))))
continue;