diff options
| author | Ingo Molnar <mingo@kernel.org> | 2019-02-28 02:29:50 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-02-28 02:29:50 -0500 |
| commit | c978b9460fe1d4a1e1effa0abd6bd69b18a098a8 (patch) | |
| tree | eecc4c6179dea191c55ac8ef50467573b29a0b06 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 0a1571243d3f150fa99c6f41f1b8e17a307a2b8b (diff) | |
| parent | de667cce7f4f96b6e22da8fd9c065b961f355080 (diff) | |
Merge tag 'perf-core-for-mingo-5.1-20190225' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
perf annotate:
Wei Li:
- Fix getting source line failure
perf script:
Andi Kleen:
- Handle missing fields with -F +...
perf data:
Jiri Olsa:
- Prep work to support per-cpu files in a directory.
Intel PT:
Adrian Hunter:
- Improve thread_stack__no_call_return()
- Hide x86 retpolines in thread stacks.
- exported SQL viewer refactorings, new 'top calls' report..
Alexander Shishkin:
- Copy parent's address filter offsets on clone
- Fix address filters for vmas with non-zero offset. Applies to
ARM's CoreSight as well.
python scripts:
Tony Jones:
- Python3 support for several 'perf script' python scripts.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
| -rwxr-xr-x | tools/perf/scripts/python/net_dropmonitor.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py index a150164b44a3..212557a02c50 100755 --- a/tools/perf/scripts/python/net_dropmonitor.py +++ b/tools/perf/scripts/python/net_dropmonitor.py | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | # Monitor the system for dropped packets and proudce a report of drop locations and counts | 1 | # Monitor the system for dropped packets and proudce a report of drop locations and counts |
| 2 | # SPDX-License-Identifier: GPL-2.0 | 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | 3 | ||
| 4 | from __future__ import print_function | ||
| 5 | |||
| 4 | import os | 6 | import os |
| 5 | import sys | 7 | import sys |
| 6 | 8 | ||
| @@ -50,19 +52,19 @@ def get_sym(sloc): | |||
| 50 | return (None, 0) | 52 | return (None, 0) |
| 51 | 53 | ||
| 52 | def print_drop_table(): | 54 | def print_drop_table(): |
| 53 | print "%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT") | 55 | print("%25s %25s %25s" % ("LOCATION", "OFFSET", "COUNT")) |
| 54 | for i in drop_log.keys(): | 56 | for i in drop_log.keys(): |
| 55 | (sym, off) = get_sym(i) | 57 | (sym, off) = get_sym(i) |
| 56 | if sym == None: | 58 | if sym == None: |
| 57 | sym = i | 59 | sym = i |
| 58 | print "%25s %25s %25s" % (sym, off, drop_log[i]) | 60 | print("%25s %25s %25s" % (sym, off, drop_log[i])) |
| 59 | 61 | ||
| 60 | 62 | ||
| 61 | def trace_begin(): | 63 | def trace_begin(): |
| 62 | print "Starting trace (Ctrl-C to dump results)" | 64 | print("Starting trace (Ctrl-C to dump results)") |
| 63 | 65 | ||
| 64 | def trace_end(): | 66 | def trace_end(): |
| 65 | print "Gathering kallsyms data" | 67 | print("Gathering kallsyms data") |
| 66 | get_kallsyms_table() | 68 | get_kallsyms_table() |
| 67 | print_drop_table() | 69 | print_drop_table() |
| 68 | 70 | ||
