diff options
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | tools/lib/traceevent/event-parse.c | 109 | ||||
| -rw-r--r-- | tools/perf/Documentation/perf-bench.txt | 22 | ||||
| -rw-r--r-- | tools/perf/Documentation/perf-top.txt | 1 | ||||
| -rw-r--r-- | tools/perf/bench/numa.c | 4 | ||||
| -rw-r--r-- | tools/perf/builtin-stat.c | 11 | ||||
| -rw-r--r-- | tools/perf/config/Makefile | 7 | ||||
| -rw-r--r-- | tools/perf/util/probe-finder.c | 15 |
8 files changed, 115 insertions, 56 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 6dc67b1fdb50..80399fff805d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -6782,7 +6782,7 @@ PERFORMANCE EVENTS SUBSYSTEM | |||
| 6782 | M: Peter Zijlstra <a.p.zijlstra@chello.nl> | 6782 | M: Peter Zijlstra <a.p.zijlstra@chello.nl> |
| 6783 | M: Paul Mackerras <paulus@samba.org> | 6783 | M: Paul Mackerras <paulus@samba.org> |
| 6784 | M: Ingo Molnar <mingo@redhat.com> | 6784 | M: Ingo Molnar <mingo@redhat.com> |
| 6785 | M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 6785 | M: Arnaldo Carvalho de Melo <acme@kernel.org> |
| 6786 | L: linux-kernel@vger.kernel.org | 6786 | L: linux-kernel@vger.kernel.org |
| 6787 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core | 6787 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core |
| 6788 | S: Supported | 6788 | S: Supported |
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 1587ea392ad6..baec7d887da4 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
| @@ -50,6 +50,18 @@ static int show_warning = 1; | |||
| 50 | warning(fmt, ##__VA_ARGS__); \ | 50 | warning(fmt, ##__VA_ARGS__); \ |
| 51 | } while (0) | 51 | } while (0) |
| 52 | 52 | ||
| 53 | #define do_warning_event(event, fmt, ...) \ | ||
| 54 | do { \ | ||
| 55 | if (!show_warning) \ | ||
| 56 | continue; \ | ||
| 57 | \ | ||
| 58 | if (event) \ | ||
| 59 | warning("[%s:%s] " fmt, event->system, \ | ||
| 60 | event->name, ##__VA_ARGS__); \ | ||
| 61 | else \ | ||
| 62 | warning(fmt, ##__VA_ARGS__); \ | ||
| 63 | } while (0) | ||
| 64 | |||
| 53 | static void init_input_buf(const char *buf, unsigned long long size) | 65 | static void init_input_buf(const char *buf, unsigned long long size) |
| 54 | { | 66 | { |
| 55 | input_buf = buf; | 67 | input_buf = buf; |
| @@ -1355,7 +1367,7 @@ static int event_read_fields(struct event_format *event, struct format_field **f | |||
| 1355 | } | 1367 | } |
| 1356 | 1368 | ||
| 1357 | if (!field->type) { | 1369 | if (!field->type) { |
| 1358 | do_warning("%s: no type found", __func__); | 1370 | do_warning_event(event, "%s: no type found", __func__); |
| 1359 | goto fail; | 1371 | goto fail; |
| 1360 | } | 1372 | } |
| 1361 | field->name = last_token; | 1373 | field->name = last_token; |
| @@ -1402,7 +1414,7 @@ static int event_read_fields(struct event_format *event, struct format_field **f | |||
| 1402 | free_token(token); | 1414 | free_token(token); |
| 1403 | type = read_token(&token); | 1415 | type = read_token(&token); |
| 1404 | if (type == EVENT_NONE) { | 1416 | if (type == EVENT_NONE) { |
| 1405 | do_warning("failed to find token"); | 1417 | do_warning_event(event, "failed to find token"); |
| 1406 | goto fail; | 1418 | goto fail; |
| 1407 | } | 1419 | } |
| 1408 | } | 1420 | } |
| @@ -1636,7 +1648,7 @@ process_cond(struct event_format *event, struct print_arg *top, char **tok) | |||
| 1636 | right = alloc_arg(); | 1648 | right = alloc_arg(); |
| 1637 | 1649 | ||
| 1638 | if (!arg || !left || !right) { | 1650 | if (!arg || !left || !right) { |
| 1639 | do_warning("%s: not enough memory!", __func__); | 1651 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 1640 | /* arg will be freed at out_free */ | 1652 | /* arg will be freed at out_free */ |
| 1641 | free_arg(left); | 1653 | free_arg(left); |
| 1642 | free_arg(right); | 1654 | free_arg(right); |
| @@ -1686,7 +1698,7 @@ process_array(struct event_format *event, struct print_arg *top, char **tok) | |||
| 1686 | 1698 | ||
| 1687 | arg = alloc_arg(); | 1699 | arg = alloc_arg(); |
| 1688 | if (!arg) { | 1700 | if (!arg) { |
| 1689 | do_warning("%s: not enough memory!", __func__); | 1701 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 1690 | /* '*tok' is set to top->op.op. No need to free. */ | 1702 | /* '*tok' is set to top->op.op. No need to free. */ |
| 1691 | *tok = NULL; | 1703 | *tok = NULL; |
| 1692 | return EVENT_ERROR; | 1704 | return EVENT_ERROR; |
| @@ -1792,7 +1804,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 1792 | if (arg->type == PRINT_OP && !arg->op.left) { | 1804 | if (arg->type == PRINT_OP && !arg->op.left) { |
| 1793 | /* handle single op */ | 1805 | /* handle single op */ |
| 1794 | if (token[1]) { | 1806 | if (token[1]) { |
| 1795 | do_warning("bad op token %s", token); | 1807 | do_warning_event(event, "bad op token %s", token); |
| 1796 | goto out_free; | 1808 | goto out_free; |
| 1797 | } | 1809 | } |
| 1798 | switch (token[0]) { | 1810 | switch (token[0]) { |
| @@ -1802,7 +1814,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 1802 | case '-': | 1814 | case '-': |
| 1803 | break; | 1815 | break; |
| 1804 | default: | 1816 | default: |
| 1805 | do_warning("bad op token %s", token); | 1817 | do_warning_event(event, "bad op token %s", token); |
| 1806 | goto out_free; | 1818 | goto out_free; |
| 1807 | 1819 | ||
| 1808 | } | 1820 | } |
| @@ -1888,7 +1900,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 1888 | char *new_atom; | 1900 | char *new_atom; |
| 1889 | 1901 | ||
| 1890 | if (left->type != PRINT_ATOM) { | 1902 | if (left->type != PRINT_ATOM) { |
| 1891 | do_warning("bad pointer type"); | 1903 | do_warning_event(event, "bad pointer type"); |
| 1892 | goto out_free; | 1904 | goto out_free; |
| 1893 | } | 1905 | } |
| 1894 | new_atom = realloc(left->atom.atom, | 1906 | new_atom = realloc(left->atom.atom, |
| @@ -1930,7 +1942,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 1930 | type = process_array(event, arg, tok); | 1942 | type = process_array(event, arg, tok); |
| 1931 | 1943 | ||
| 1932 | } else { | 1944 | } else { |
| 1933 | do_warning("unknown op '%s'", token); | 1945 | do_warning_event(event, "unknown op '%s'", token); |
| 1934 | event->flags |= EVENT_FL_FAILED; | 1946 | event->flags |= EVENT_FL_FAILED; |
| 1935 | /* the arg is now the left side */ | 1947 | /* the arg is now the left side */ |
| 1936 | goto out_free; | 1948 | goto out_free; |
| @@ -1951,7 +1963,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 1951 | return type; | 1963 | return type; |
| 1952 | 1964 | ||
| 1953 | out_warn_free: | 1965 | out_warn_free: |
| 1954 | do_warning("%s: not enough memory!", __func__); | 1966 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 1955 | out_free: | 1967 | out_free: |
| 1956 | free_token(token); | 1968 | free_token(token); |
| 1957 | *tok = NULL; | 1969 | *tok = NULL; |
| @@ -2385,7 +2397,7 @@ process_flags(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 2385 | 2397 | ||
| 2386 | field = alloc_arg(); | 2398 | field = alloc_arg(); |
| 2387 | if (!field) { | 2399 | if (!field) { |
| 2388 | do_warning("%s: not enough memory!", __func__); | 2400 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 2389 | goto out_free; | 2401 | goto out_free; |
| 2390 | } | 2402 | } |
| 2391 | 2403 | ||
| @@ -2438,7 +2450,7 @@ process_symbols(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 2438 | 2450 | ||
| 2439 | field = alloc_arg(); | 2451 | field = alloc_arg(); |
| 2440 | if (!field) { | 2452 | if (!field) { |
| 2441 | do_warning("%s: not enough memory!", __func__); | 2453 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 2442 | goto out_free; | 2454 | goto out_free; |
| 2443 | } | 2455 | } |
| 2444 | 2456 | ||
| @@ -2477,7 +2489,7 @@ process_hex(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 2477 | 2489 | ||
| 2478 | field = alloc_arg(); | 2490 | field = alloc_arg(); |
| 2479 | if (!field) { | 2491 | if (!field) { |
| 2480 | do_warning("%s: not enough memory!", __func__); | 2492 | do_warning_event(event, "%s: not enough memory!", __func__); |
| 2481 | goto out_free; | 2493 | goto out_free; |
| 2482 | } | 2494 | } |
| 2483 | 2495 | ||
| @@ -2492,7 +2504,7 @@ process_hex(struct event_format *event, struct print_arg *arg, char **tok) | |||
| 2492 | 2504 | ||
| 2493 | field = alloc_arg(); | 2505 | field = alloc_arg(); |
| 2494 | if (!field) { | 2506 | if (!field) { |
| 2495 | do_warning("%s: not enough memory!", __func__); | ||
