Ravi Bangoria
7384083ba6
perf annotate: Make perf config effective
...
perf default config set by user in [annotate] section is totally ignored
by annotate code. Fix it.
Before:
$ ./perf config
annotate.hide_src_code=true
annotate.show_nr_jumps=true
annotate.show_nr_samples=true
$ ./perf annotate shash
│ unsigned h = 0;
│ movl $0x0,-0xc(%rbp)
│ while (*s)
│ ↓ jmp 44
│ h = 65599 * h + *s++;
11.33 │24: mov -0xc(%rbp),%eax
43.50 │ imul $0x1003f,%eax,%ecx
│ mov -0x18(%rbp),%rax
After:
│ movl $0x0,-0xc(%rbp)
│ ↓ jmp 44
1 │1 24: mov -0xc(%rbp),%eax
4 │ imul $0x1003f,%eax,%ecx
│ mov -0x18(%rbp),%rax
Note that we have removed show_nr_samples and show_total_period from
annotation_options because they are not used. Instead of them we use
symbol_conf.show_nr_samples and symbol_conf.show_total_period.
Committer testing:
Using 'perf annotate --stdio2' to use the TUI rendering but emitting the output to stdio:
# perf config
#
# perf config annotate.hide_src_code=true
# perf config
annotate.hide_src_code=true
#
# perf config annotate.show_nr_jumps=true
# perf config annotate.show_nr_samples=true
# perf config
annotate.hide_src_code=true
annotate.show_nr_jumps=true
annotate.show_nr_samples=true
#
#
Before:
# perf annotate --stdio2 ObjectInstance::weak_pointer_was_finalized
Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
Percent
00000000000609f0 <ObjectInstance::weak_pointer_was_finalized()@@Base>:
endbr64
cmpq $0x0,0x20(%rdi)
↓ je 10
xor %eax,%eax
← retq
xchg %ax,%ax
100.00 10: push %rbp
cmpq $0x0,0x18(%rdi)
mov %rdi,%rbp
↓ jne 20
1b: xor %eax,%eax
pop %rbp
← retq
nop
20: lea 0x18(%rdi),%rdi
→ callq JS_UpdateWeakPointerAfterGC(JS::Heap<JSObject*
cmpq $0x0,0x18(%rbp)
↑ jne 1b
mov %rbp,%rdi
→ callq ObjectBase::jsobj_addr() const@plt
mov $0x1,%eax
pop %rbp
← retq
#
After:
# perf annotate --stdio2 ObjectInstance::weak_pointer_was_finalized 2> /dev/null
Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
Samples endbr64
cmpq $0x0,0x20(%rdi)
↓ je 10
xor %eax,%eax
← retq
xchg %ax,%ax
1 1 10: push %rbp
cmpq $0x0,0x18(%rdi)
mov %rdi,%rbp
↓ jne 20
1 1b: xor %eax,%eax
pop %rbp
← retq
nop
1 20: lea 0x18(%rdi),%rdi
→ callq JS_UpdateWeakPointerAfterGC(JS::Heap<JSObject*
cmpq $0x0,0x18(%rbp)
↑ jne 1b
mov %rbp,%rdi
→ callq ObjectBase::jsobj_addr() const@plt
mov $0x1,%eax
pop %rbp
← retq
#
# perf config annotate.show_nr_jumps
annotate.show_nr_jumps=true
# perf config annotate.show_nr_jumps=false
# perf config annotate.show_nr_jumps
annotate.show_nr_jumps=false
#
# perf annotate --stdio2 ObjectInstance::weak_pointer_was_finalized 2> /dev/null
Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
Samples endbr64
cmpq $0x0,0x20(%rdi)
↓ je 10
xor %eax,%eax
← retq
xchg %ax,%ax
1 10: push %rbp
cmpq $0x0,0x18(%rdi)
mov %rdi,%rbp
↓ jne 20
1b: xor %eax,%eax
pop %rbp
← retq
nop
20: lea 0x18(%rdi),%rdi
→ callq JS_UpdateWeakPointerAfterGC(JS::Heap<JSObject*
cmpq $0x0,0x18(%rbp)
↑ jne 1b
mov %rbp,%rdi
→ callq ObjectBase::jsobj_addr() const@plt
mov $0x1,%eax
pop %rbp
← retq
#
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Changbin Du <changbin.du@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Yisheng Xie <xieyisheng1@huawei.com>
Link: http://lore.kernel.org/lkml/20200213064306.160480-6-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-02-27 10:44:59 -03:00
..
2020-01-14 12:02:19 -03:00
2019-09-20 09:19:20 -03:00
2019-12-02 11:40:57 -03:00
2019-08-31 22:27:52 -03:00
2019-09-20 09:19:20 -03:00
2019-11-26 11:07:46 -03:00
2019-11-28 08:08:38 -03:00
2019-11-28 08:08:38 -03:00
2020-02-27 10:44:59 -03:00
2020-02-27 10:44:59 -03:00
2019-03-11 11:56:02 -03:00
2019-09-20 09:19:21 -03:00
2020-02-18 10:13:29 -03:00
2020-02-18 10:13:29 -03:00
2019-11-19 19:37:04 -03:00
2019-11-19 19:37:04 -03:00
2019-01-25 15:12:09 +01:00
2019-01-25 15:12:09 +01:00
2019-02-19 16:11:56 -03:00
2019-02-19 16:11:56 -03:00
2019-11-26 11:07:46 -03:00
2019-09-20 09:19:22 -03:00
2019-09-25 09:51:48 -03:00
2019-07-29 18:34:42 -03:00
2019-08-31 19:10:19 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-11-28 08:08:38 -03:00
2019-09-25 09:51:49 -03:00
2019-07-29 18:34:42 -03:00
2019-08-29 17:38:32 -03:00
2019-08-26 11:58:29 -03:00
2019-07-09 10:13:27 -03:00
2019-06-05 17:36:37 +02:00
2019-11-26 11:07:46 -03:00
2019-11-12 08:20:53 -03:00
2019-08-14 10:48:39 -03:00
2019-08-14 10:59:59 -03:00
2019-08-31 22:24:10 -03:00
2019-07-29 18:34:42 -03:00
2019-09-20 09:19:20 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-01-25 15:12:08 +01:00
2019-07-09 10:13:26 -03:00
2019-01-25 15:12:09 +01:00
2019-05-15 16:36:49 -03:00
2020-02-27 10:44:54 -03:00
2020-02-27 10:44:54 -03:00
2019-10-15 12:05:18 -03:00
2019-09-25 09:51:49 -03:00
2019-07-29 18:34:42 -03:00
2019-08-22 17:16:56 -03:00
2019-02-06 10:00:39 -03:00
2019-11-06 15:49:39 -03:00
2019-11-29 12:20:45 -03:00
2019-08-22 17:16:57 -03:00
2019-08-31 19:10:40 -03:00
2019-11-26 11:07:46 -03:00
2019-08-31 22:24:10 -03:00
2019-09-20 15:58:11 -03:00
2019-11-06 15:43:05 -03:00
2019-11-06 15:43:05 -03:00
2019-11-26 11:07:46 -03:00
2019-07-29 18:34:42 -03:00
2019-11-12 08:32:27 -03:00
2019-11-12 08:32:27 -03:00
2019-09-20 09:19:20 -03:00
2019-09-20 09:19:20 -03:00
2019-11-19 19:12:26 -03:00
2019-11-19 19:12:26 -03:00
2019-11-19 19:12:26 -03:00
2019-11-19 19:12:26 -03:00
2018-12-28 16:33:02 -03:00
2018-12-28 16:33:02 -03:00
2019-11-18 18:56:27 -03:00
2019-11-06 15:43:06 -03:00
2019-09-20 09:19:20 -03:00
2019-11-06 15:49:39 -03:00
2019-11-06 15:49:39 -03:00
2019-11-26 11:07:46 -03:00
2019-11-21 10:54:20 -03:00
2019-08-31 22:24:10 -03:00
2019-11-29 12:20:45 -03:00
2019-11-29 12:20:45 -03:00
2020-01-30 11:55:02 +01:00
2019-11-12 08:20:53 -03:00
2019-09-25 16:26:34 -03:00
2020-01-30 11:55:02 +01:00
2019-11-29 12:20:45 -03:00
2019-08-15 12:26:13 -03:00
2019-08-15 12:25:55 -03:00
2020-01-14 12:02:19 -03:00
2019-01-08 13:28:13 -03:00
2019-11-28 08:08:38 -03:00
2019-11-28 08:08:38 -03:00
2019-08-29 17:38:32 -03:00
2019-11-29 12:20:45 -03:00
2019-09-25 16:26:41 -03:00
2018-04-12 10:33:31 -03:00
2019-08-26 11:58:29 -03:00
2019-07-09 10:13:26 -03:00
2020-01-15 10:17:20 -03:00
2019-11-06 15:43:05 -03:00
2019-07-09 10:13:26 -03:00
2019-11-26 11:07:46 -03:00
2019-12-20 18:58:13 -03:00
2019-09-25 09:51:47 -03:00
2019-06-05 17:36:37 +02:00
2019-11-26 11:07:46 -03:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:04 +02:00
2019-01-25 15:12:10 +01:00
2019-09-30 17:29:49 -03:00
2019-06-19 17:09:51 +02:00
2019-09-20 10:28:26 -03:00
2020-02-14 10:06:00 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:20 -03:00
2020-02-11 16:41:49 -03:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2020-02-11 16:41:49 -03:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2019-08-31 19:10:40 -03:00
2019-08-31 19:10:40 -03:00
2019-11-12 08:20:53 -03:00
2019-08-31 22:27:48 -03:00
2019-09-20 09:19:22 -03:00
2019-12-11 12:28:14 -03:00
2019-08-31 22:27:52 -03:00
2020-01-06 11:46:09 -03:00
2020-01-06 11:46:09 -03:00
2019-09-20 10:28:21 -03:00
2019-09-20 10:28:21 -03:00
2019-08-31 19:10:19 -03:00
2018-12-17 15:02:17 -03:00
2019-08-31 19:10:19 -03:00
2020-01-30 11:55:02 +01:00
2019-11-22 10:48:13 -03:00
2019-11-22 10:48:13 -03:00
2020-01-14 12:02:19 -03:00
2019-10-10 09:29:33 -03:00
2019-05-15 16:36:49 -03:00
2019-08-31 22:24:10 -03:00
2019-08-31 22:24:10 -03:00
2019-11-21 10:54:20 -03:00
2019-10-10 09:29:33 -03:00
2019-11-28 08:08:38 -03:00
2019-09-20 09:19:20 -03:00
2019-05-28 18:37:44 -03:00
2019-11-28 08:08:38 -03:00
2019-11-22 10:48:13 -03:00
2019-06-25 21:02:47 -03:00
2019-11-26 11:07:46 -03:00
2019-11-18 19:09:23 -03:00
2019-11-18 19:08:02 -03:00
2019-11-18 19:08:02 -03:00
2020-01-31 09:33:58 +01:00
2019-11-18 19:09:23 -03:00
2019-08-31 19:10:19 -03:00
2019-11-28 08:08:38 -03:00
2019-11-12 08:32:27 -03:00
2019-01-25 15:12:10 +01:00
2019-06-05 17:37:04 +02:00
2019-01-25 15:12:10 +01:00
2019-11-22 10:43:24 -03:00
2019-11-22 10:48:13 -03:00
2019-07-09 14:59:11 -03:00
2019-07-09 14:59:11 -03:00
2019-09-20 09:19:20 -03:00
2019-01-21 17:00:48 -03:00
2018-08-08 15:26:48 -03:00
2019-09-20 09:19:21 -03:00
2018-08-03 10:34:18 -03:00
2019-09-20 09:19:20 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:42 -03:00
2019-11-22 10:48:13 -03:00
2019-11-22 10:48:13 -03:00
2019-07-09 10:13:26 -03:00
2019-08-14 10:48:39 -03:00
2019-06-10 16:20:11 -03:00
2020-01-06 11:46:10 -03:00
2020-01-06 11:46:10 -03:00
2019-10-11 10:57:00 -03:00
2019-10-11 10:57:00 -03:00
2019-11-28 08:08:38 -03:00
2019-02-06 10:00:38 -03:00
2020-01-30 11:55:26 +01:00
2019-01-25 15:12:09 +01:00
2019-11-06 15:49:39 -03:00
2020-02-10 16:30:09 -03:00
2019-11-29 12:20:45 -03:00
2019-11-29 12:20:45 -03:00
2019-08-31 19:10:19 -03:00
2019-07-09 10:13:26 -03:00
2019-10-15 13:03:57 -03:00
2019-07-01 22:50:40 -03:00
2019-07-09 10:13:26 -03:00
2019-01-25 15:12:10 +01:00
2019-09-20 09:19:21 -03:00
2019-08-29 17:38:31 -03:00
2019-11-07 10:14:48 -03:00
2019-08-31 22:24:05 -03:00
2019-12-20 18:55:40 -03:00
2019-09-20 09:19:20 -03:00
2020-02-10 16:30:51 -03:00
2019-11-26 11:07:46 -03:00
2019-08-31 22:24:05 -03:00
2019-11-26 11:07:46 -03:00
2019-09-20 09:19:22 -03:00
2019-07-29 18:34:42 -03:00
2019-07-29 18:34:42 -03:00
2019-09-20 09:19:20 -03:00
2019-08-29 08:36:12 -03:00
2019-08-29 08:36:12 -03:00
2019-11-26 11:07:46 -03:00
2019-06-17 20:48:14 +02:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2019-10-15 08:36:22 -03:00
2019-10-15 08:36:22 -03:00
2019-08-26 19:39:11 -03:00
2019-09-25 09:51:48 -03:00
2019-08-31 22:24:10 -03:00
2019-09-25 09:51:48 -03:00
2019-11-05 08:39:27 -03:00
2019-09-20 09:19:20 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:20 -03:00
2019-11-05 08:39:27 -03:00
2019-08-29 17:38:32 -03:00
2019-09-20 09:19:22 -03:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2019-11-26 11:07:46 -03:00
2019-09-20 09:19:20 -03:00
2019-11-06 15:43:05 -03:00
2019-09-25 09:51:49 -03:00
2019-08-31 19:10:19 -03:00
2019-11-26 11:07:46 -03:00
2019-07-09 10:13:26 -03:00
2019-09-20 09:19:20 -03:00
2019-07-23 09:04:03 -03:00