diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-10 18:22:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-10 18:22:03 -0400 |
| commit | 12ad143e1b803e541e48b8ba40f550250259ecdd (patch) | |
| tree | 5202b407df21e5abaeb294d1ecddcf0a2eca7f8b /tools/perf/scripts/python/netdev-times.py | |
| parent | 262d6a9a63a387c8dfa9eb4f7713e159c941e52c (diff) | |
| parent | b339da480315505aa28a723a983217ebcff95c86 (diff) | |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Thomas Gleixner:
"Perf updates and fixes:
Kernel:
- Handle events which have the bpf_event attribute set as side band
events as they carry information about BPF programs.
- Add missing switch-case fall-through comments
Libraries:
- Fix leaks and double frees in error code paths.
- Prevent buffer overflows in libtraceevent
Tools:
- Improvements in handling Intel BT/PTS
- Add BTF ELF markers to perf trace BPF programs to improve output
- Support --time, --cpu, --pid and --tid filters for perf diff
- Calculate the column width in perf annotate as the hardcoded 6
characters for the instruction are not sufficient
- Small fixes all over the place"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits)
perf/core: Mark expected switch fall-through
perf/x86/intel/uncore: Fix client IMC events return huge result
perf/ring_buffer: Use high order allocations for AUX buffers optimistically
perf data: Force perf_data__open|close zero data->file.path
perf session: Fix double free in perf_data__close
perf evsel: Probe for precise_ip with simple attr
perf tools: Read and store caps/max_precise in perf_pmu
perf hist: Fix memory leak of srcline
perf hist: Add error path into hist_entry__init
perf c2c: Fix c2c report for empty numa node
perf script python: Add Python3 support to intel-pt-events.py
perf script python: Add Python3 support to event_analyzing_sample.py
perf script python: add Python3 support to check-perf-trace.py
perf script python: Add Python3 support to futex-contention.py
perf script python: Remove mixed indentation
perf diff: Support --pid/--tid filter options
perf diff: Support --cpu filter option
perf diff: Support --time filter option
perf thread: Generalize function to copy from thread addr space from intel-bts code
perf annotate: Calculate the max instruction name, align column to that
...
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
| -rw-r--r-- | tools/perf/scripts/python/netdev-times.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py index 267bda49325d..ea0c8b90a783 100644 --- a/tools/perf/scripts/python/netdev-times.py +++ b/tools/perf/scripts/python/netdev-times.py | |||
| @@ -124,14 +124,16 @@ def print_receive(hunk): | |||
| 124 | event = event_list[i] | 124 | event = event_list[i] |
| 125 | if event['event_name'] == 'napi_poll': | 125 | if event['event_name'] == 'napi_poll': |
| 126 | print(PF_NAPI_POLL % | 126 | print(PF_NAPI_POLL % |
| 127 | (diff_msec(base_t, event['event_t']), event['dev'])) | 127 | (diff_msec(base_t, event['event_t']), |
| 128 | event['dev'])) | ||
| 128 | if i == len(event_list) - 1: | 129 | if i == len(event_list) - 1: |
| 129 | print("") | 130 | print("") |
| 130 | else: | 131 | else: |
| 131 | print(PF_JOINT) | 132 | print(PF_JOINT) |
| 132 | else: | 133 | else: |
| 133 | print(PF_NET_RECV % | 134 | print(PF_NET_RECV % |
| 134 | (diff_msec(base_t, event['event_t']), event['skbaddr'], | 135 | (diff_msec(base_t, event['event_t']), |
| 136 | event['skbaddr'], | ||
| 135 | event['len'])) | 137 | event['len'])) |
| 136 | if 'comm' in event.keys(): | 138 | if 'comm' in event.keys(): |
| 137 | print(PF_WJOINT) | 139 | print(PF_WJOINT) |
| @@ -256,7 +258,7 @@ def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, i | |||
| 256 | all_event_list.append(event_info) | 258 | all_event_list.append(event_info) |
| 257 | 259 | ||
| 258 | def napi__napi_poll(name, context, cpu, sec, nsec, pid, comm, callchain, napi, | 260 | def napi__napi_poll(name, context, cpu, sec, nsec, pid, comm, callchain, napi, |
| 259 | dev_name, work=None, budget=None): | 261 | dev_name, work=None, budget=None): |
| 260 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 262 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
| 261 | napi, dev_name, work, budget) | 263 | napi, dev_name, work, budget) |
| 262 | all_event_list.append(event_info) | 264 | all_event_list.append(event_info) |
| @@ -353,7 +355,7 @@ def handle_irq_softirq_exit(event_info): | |||
| 353 | if irq_list == [] or event_list == 0: | 355 | if irq_list == [] or event_list == 0: |
| 354 | return | 356 | return |
| 355 | rec_data = {'sirq_ent_t':sirq_ent_t, 'sirq_ext_t':time, | 357 | rec_data = {'sirq_ent_t':sirq_ent_t, 'sirq_ext_t':time, |
| 356 | 'irq_list':irq_list, 'event_list':event_list} | 358 | 'irq_list':irq_list, 'event_list':event_list} |
| 357 | # merge information realted to a NET_RX softirq | 359 | # merge information realted to a NET_RX softirq |
| 358 | receive_hunk_list.append(rec_data) | 360 | receive_hunk_list.append(rec_data) |
| 359 | 361 | ||
| @@ -390,7 +392,7 @@ def handle_netif_receive_skb(event_info): | |||
| 390 | skbaddr, skblen, dev_name) = event_info | 392 | skbaddr, skblen, dev_name) = event_info |
| 391 | if cpu in net_rx_dic.keys(): | 393 | if cpu in net_rx_dic.keys(): |
| 392 | rec_data = {'event_name':'netif_receive_skb', | 394 | rec_data = {'event_name':'netif_receive_skb', |
| 393 | 'event_t':time, 'skbaddr':skbaddr, 'len':skblen} | 395 | 'event_t':time, 'skbaddr':skbaddr, 'len':skblen} |
| 394 | event_list = net_rx_dic[cpu]['event_list'] | 396 | event_list = net_rx_dic[cpu]['event_list'] |
| 395 | event_list.append(rec_data) | 397 | event_list.append(rec_data) |
| 396 | rx_skb_list.insert(0, rec_data) | 398 | rx_skb_list.insert(0, rec_data) |
