All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] The -Og debugging experience
@ 2015-12-02 16:48 Jiri Olsa
  2015-12-03  8:29 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jiri Olsa @ 2015-12-02 16:48 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Namhyung Kim, Peter Zijlstra, Martin Liska

heya,
using the -Og for DEBUG=1 builds gives me many 'optimized out' stuff

It was introduced in here:
  e8b7ea4356fd perf tools: Improve setting of gcc debug option

- here's backtrace from segfault I was looking at, current code:

(gdb) bt
#0  0x00000000004b490f in parse_events__scan_string (yystr=yystr@entry=0x0, yyscanner=0x1916be0) at util/parse-events-flex.c:3353
#1  0x000000000048fe6f in parse_events__scanner (str=0x0, data=data@entry=0x7fffffffdac0, start_token=start_token@entry=258)
    at util/parse-events.c:1356
#2  0x0000000000491775 in parse_events (evlist=evlist@entry=0x1917c90, str=<optimized out>, err=err@entry=0x0) at util/parse-events.c:1401
#3  0x0000000000468bf6 in __perf_evsel__name_array_test (names=0x872c00 <perf_evsel.sw_names>, nr_names=nr_names@entry=11)
    at tests/evsel-roundtrip-name.c:74
#4  0x0000000000468f13 in test__perf_evsel__roundtrip_name_test (subtest=<optimized out>) at tests/evsel-roundtrip-name.c:106
#5  0x000000000045a2c8 in run_test (test=test@entry=0x86fe50 <generic_tests+400>, subtest=subtest@entry=-1) at tests/builtin-test.c:241
#6  0x000000000045a3a1 in test_and_print (t=t@entry=0x86fe50 <generic_tests+400>, force_skip=force_skip@entry=false,
    subtest=subtest@entry=-1) at tests/builtin-test.c:268
#7  0x000000000045a5cd in __cmd_test (argc=argc@entry=1, argv=argv@entry=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
#8  0x000000000045a8a9 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=<optimized out>) at tests/builtin-test.c:416
#9  0x00000000004784a9 in run_builtin (p=p@entry=0x871e18 <commands+504>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe200) at perf.c:387
#10 0x00000000004786a4 in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
#11 0x0000000000478710 in run_argv (argcp=argcp@entry=0x7fffffffe06c, argv=argv@entry=0x7fffffffe060) at perf.c:492
#12 0x0000000000478981 in main (argc=2, argv=0x7fffffffe200) at perf.c:609


- and same crash with above patch reverted:

(gdb) bt
#0  0x00007ffff573f36a in strlen () from /lib64/libc.so.6
#1  0x00000000004f458b in parse_events__scan_string (yystr=0x0, yyscanner=0x1985be0) at util/parse-events-flex.c:3353
#2  0x00000000004bc752 in parse_events__scanner (str=0x0, data=0x7fffffffda50, start_token=258) at util/parse-events.c:1356
#3  0x00000000004bc8e2 in parse_events (evlist=0x1986c90, str=0x0, err=0x0) at util/parse-events.c:1401
#4  0x00000000004837c4 in __perf_evsel__name_array_test (names=0x8e1140 <perf_evsel.sw_names>, nr_names=11)
    at tests/evsel-roundtrip-name.c:74
#5  0x0000000000483969 in test__perf_evsel__roundtrip_name_test (subtest=-1) at tests/evsel-roundtrip-name.c:106
#6  0x000000000047099b in run_test (test=0x8de030 <generic_tests+400>, subtest=-1) at tests/builtin-test.c:241
#7  0x0000000000470ae3 in test_and_print (t=0x8de030 <generic_tests+400>, force_skip=false, subtest=-1) at tests/builtin-test.c:268
#8  0x0000000000470d71 in __cmd_test (argc=1, argv=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
#9  0x00000000004711c4 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=0x0) at tests/builtin-test.c:416
#10 0x0000000000498070 in run_builtin (p=0x8dfe58 <commands+504>, argc=2, argv=0x7fffffffe200) at perf.c:387
#11 0x00000000004982de in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
#12 0x000000000049842a in run_argv (argcp=0x7fffffffe05c, argv=0x7fffffffe050) at perf.c:492
#13 0x0000000000498786 in main (argc=2, argv=0x7fffffffe200) at perf.c:609


I haven't tracked the history of -Og, maybe it gets better from some gcc version?

If there's no clue, I rather revert this one, because it does
provide the proper debugging experience ;-)

thoughts?
jirka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-02 16:48 [RFC] The -Og debugging experience Jiri Olsa
@ 2015-12-03  8:29 ` Ingo Molnar
  2015-12-07 10:48 ` Martin Liška
  2015-12-14  8:15 ` [tip:perf/core] Revert "perf tools: Improve setting of gcc debug option" tip-bot for Arnaldo Carvalho de Melo
  2 siblings, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2015-12-03  8:29 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Namhyung Kim, Peter Zijlstra, Martin Liska


* Jiri Olsa <jolsa@redhat.com> wrote:

> If there's no clue, I rather revert this one, because it does
> provide the proper debugging experience ;-)

Agreed absolutely - I didn't realize that it's broken.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-02 16:48 [RFC] The -Og debugging experience Jiri Olsa
  2015-12-03  8:29 ` Ingo Molnar
@ 2015-12-07 10:48 ` Martin Liška
  2015-12-07 13:45   ` Jiri Olsa
  2015-12-14  8:15 ` [tip:perf/core] Revert "perf tools: Improve setting of gcc debug option" tip-bot for Arnaldo Carvalho de Melo
  2 siblings, 1 reply; 11+ messages in thread
From: Martin Liška @ 2015-12-07 10:48 UTC (permalink / raw)
  To: Jiri Olsa, Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Namhyung Kim, Peter Zijlstra

On 12/02/2015 05:48 PM, Jiri Olsa wrote:
> heya,
> using the -Og for DEBUG=1 builds gives me many 'optimized out' stuff
> 
> It was introduced in here:
>   e8b7ea4356fd perf tools: Improve setting of gcc debug option
> 
> - here's backtrace from segfault I was looking at, current code:

Hi.

Can you please provide a test-case which I can use for testing of the issue?
If -Og is problem, I would suggest to use -O0 as a default DEBUG configure option.

Thanks,
Martin

> 
> (gdb) bt
> #0  0x00000000004b490f in parse_events__scan_string (yystr=yystr@entry=0x0, yyscanner=0x1916be0) at util/parse-events-flex.c:3353
> #1  0x000000000048fe6f in parse_events__scanner (str=0x0, data=data@entry=0x7fffffffdac0, start_token=start_token@entry=258)
>     at util/parse-events.c:1356
> #2  0x0000000000491775 in parse_events (evlist=evlist@entry=0x1917c90, str=<optimized out>, err=err@entry=0x0) at util/parse-events.c:1401
> #3  0x0000000000468bf6 in __perf_evsel__name_array_test (names=0x872c00 <perf_evsel.sw_names>, nr_names=nr_names@entry=11)
>     at tests/evsel-roundtrip-name.c:74
> #4  0x0000000000468f13 in test__perf_evsel__roundtrip_name_test (subtest=<optimized out>) at tests/evsel-roundtrip-name.c:106
> #5  0x000000000045a2c8 in run_test (test=test@entry=0x86fe50 <generic_tests+400>, subtest=subtest@entry=-1) at tests/builtin-test.c:241
> #6  0x000000000045a3a1 in test_and_print (t=t@entry=0x86fe50 <generic_tests+400>, force_skip=force_skip@entry=false,
>     subtest=subtest@entry=-1) at tests/builtin-test.c:268
> #7  0x000000000045a5cd in __cmd_test (argc=argc@entry=1, argv=argv@entry=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
> #8  0x000000000045a8a9 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=<optimized out>) at tests/builtin-test.c:416
> #9  0x00000000004784a9 in run_builtin (p=p@entry=0x871e18 <commands+504>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe200) at perf.c:387
> #10 0x00000000004786a4 in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
> #11 0x0000000000478710 in run_argv (argcp=argcp@entry=0x7fffffffe06c, argv=argv@entry=0x7fffffffe060) at perf.c:492
> #12 0x0000000000478981 in main (argc=2, argv=0x7fffffffe200) at perf.c:609
> 
> 
> - and same crash with above patch reverted:
> 
> (gdb) bt
> #0  0x00007ffff573f36a in strlen () from /lib64/libc.so.6
> #1  0x00000000004f458b in parse_events__scan_string (yystr=0x0, yyscanner=0x1985be0) at util/parse-events-flex.c:3353
> #2  0x00000000004bc752 in parse_events__scanner (str=0x0, data=0x7fffffffda50, start_token=258) at util/parse-events.c:1356
> #3  0x00000000004bc8e2 in parse_events (evlist=0x1986c90, str=0x0, err=0x0) at util/parse-events.c:1401
> #4  0x00000000004837c4 in __perf_evsel__name_array_test (names=0x8e1140 <perf_evsel.sw_names>, nr_names=11)
>     at tests/evsel-roundtrip-name.c:74
> #5  0x0000000000483969 in test__perf_evsel__roundtrip_name_test (subtest=-1) at tests/evsel-roundtrip-name.c:106
> #6  0x000000000047099b in run_test (test=0x8de030 <generic_tests+400>, subtest=-1) at tests/builtin-test.c:241
> #7  0x0000000000470ae3 in test_and_print (t=0x8de030 <generic_tests+400>, force_skip=false, subtest=-1) at tests/builtin-test.c:268
> #8  0x0000000000470d71 in __cmd_test (argc=1, argv=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
> #9  0x00000000004711c4 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=0x0) at tests/builtin-test.c:416
> #10 0x0000000000498070 in run_builtin (p=0x8dfe58 <commands+504>, argc=2, argv=0x7fffffffe200) at perf.c:387
> #11 0x00000000004982de in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
> #12 0x000000000049842a in run_argv (argcp=0x7fffffffe05c, argv=0x7fffffffe050) at perf.c:492
> #13 0x0000000000498786 in main (argc=2, argv=0x7fffffffe200) at perf.c:609
> 
> 
> I haven't tracked the history of -Og, maybe it gets better from some gcc version?
> 
> If there's no clue, I rather revert this one, because it does
> provide the proper debugging experience ;-)
> 
> thoughts?
> jirka
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-07 10:48 ` Martin Liška
@ 2015-12-07 13:45   ` Jiri Olsa
  2015-12-07 14:04     ` Martin Liška
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2015-12-07 13:45 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Namhyung Kim, Peter Zijlstra

On Mon, Dec 07, 2015 at 11:48:07AM +0100, Martin Liška wrote:
> On 12/02/2015 05:48 PM, Jiri Olsa wrote:
> > heya,
> > using the -Og for DEBUG=1 builds gives me many 'optimized out' stuff
> > 
> > It was introduced in here:
> >   e8b7ea4356fd perf tools: Improve setting of gcc debug option
> > 
> > - here's backtrace from segfault I was looking at, current code:
> 
> Hi.
> 
> Can you please provide a test-case which I can use for testing of the issue?

just run perf report in gdb and kill it with sigsegv from other terminal
this gives me several instances of <optimized out> right in the backtrace

jirka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-07 13:45   ` Jiri Olsa
@ 2015-12-07 14:04     ` Martin Liška
  2015-12-07 14:16       ` Jiri Olsa
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Liška @ 2015-12-07 14:04 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Namhyung Kim, Peter Zijlstra

On 12/07/2015 02:45 PM, Jiri Olsa wrote:
> On Mon, Dec 07, 2015 at 11:48:07AM +0100, Martin Liška wrote:
>> On 12/02/2015 05:48 PM, Jiri Olsa wrote:
>>> heya,
>>> using the -Og for DEBUG=1 builds gives me many 'optimized out' stuff
>>>
>>> It was introduced in here:
>>>   e8b7ea4356fd perf tools: Improve setting of gcc debug option
>>>
>>> - here's backtrace from segfault I was looking at, current code:
>>
>> Hi.
>>
>> Can you please provide a test-case which I can use for testing of the issue?
> 
> just run perf report in gdb and kill it with sigsegv from other terminal
> this gives me several instances of <optimized out> right in the backtrace
> 
> jirka
> 

Hi.

Unfortunately, running 'perf report' for a medium-size report is very fast a
killing the process from other terminal produces:

[Current thread is 1 (Thread 0x7ffff7fc5740 (LWP 7429))]
(gdb) bt
#0  0x00007ffff632d230 in __write_nocancel () from /lib64/libc.so.6
#1  0x00007ffff62c4dff in _IO_new_file_write () from /lib64/libc.so.6
#2  0x00007ffff62c4403 in new_do_write () from /lib64/libc.so.6
#3  0x00007ffff62c5d09 in __GI__IO_do_write () from /lib64/libc.so.6
#4  0x00007ffff62c5417 in __GI__IO_file_xsputn () from /lib64/libc.so.6
#5  0x00007ffff6299cdb in vfprintf () from /lib64/libc.so.6
#6  0x00007ffff62a03f7 in fprintf () from /lib64/libc.so.6
#7  0x00000000004ef12c in hist_entry__fprintf (he=he@entry=0x1c62b30, size=<optimized out>, size@entry=0, hists=hists@entry=0x1813818, 
    bf=bf@entry=0x1d5cd40 "     0.08%  cc1plus   cc1plus", ' ' <repeats 11 times>, "[.] _Z25number_of_iterations_exitP4loopP8edge_defP15tree_niter_descbb", ' ' <repeats 91 times>..., bfsz=bfsz@entry=479, fp=fp@entry=0x7ffff65f0640 <_IO_2_1_stdout_>)
    at ui/stdio/hist.c:427
#8  0x00000000004ef549 in hists__fprintf (hists=hists@entry=0x1813818, show_header=show_header@entry=true, max_rows=max_rows@entry=0, max_cols=max_cols@entry=0, min_pcnt=0, fp=0x7ffff65f0640 <_IO_2_1_stdout_>) at ui/stdio/hist.c:534
#9  0x000000000042d6a3 in perf_evlist__tty_browse_hists (evlist=0x1812c90, rep=rep@entry=0x7fffffffc6e0, help=help@entry=0x515948 "For a higher level overview, try: perf report --sort comm,dso") at builtin-report.c:370
#10 0x000000000042d7d2 in report__browse_hists (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:455
#11 0x000000000042d992 in __cmd_report (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:571
#12 0x000000000042ec1f in cmd_report (argc=0, argv=0x7fffffffde00, prefix=<optimized out>) at builtin-report.c:957
#13 0x000000000046c496 in run_builtin (p=p@entry=0x7771a0 <commands+192>, argc=argc@entry=1, argv=argv@entry=0x7fffffffde00) at perf.c:387
#14 0x000000000046c693 in handle_internal_command (argc=1, argv=0x7fffffffde00) at perf.c:448
#15 0x000000000046c6fe in run_argv (argcp=argcp@entry=0x7fffffffdc6c, argv=argv@entry=0x7fffffffdc60) at perf.c:492
#16 0x000000000046c94c in main (argc=1, argv=0x7fffffffde00) at perf.c:609

Which is fine.

I've been using GCC 5.2. What version are you using?
I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.

I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.
Thanks,
Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-07 14:04     ` Martin Liška
@ 2015-12-07 14:16       ` Jiri Olsa
  2015-12-10 13:07         ` Martin Liška
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2015-12-07 14:16 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Namhyung Kim, Peter Zijlstra

On Mon, Dec 07, 2015 at 03:04:27PM +0100, Martin Liška wrote:

SNIP

> Hi.
> 
> Unfortunately, running 'perf report' for a medium-size report is very fast a

not if you use TUI ;-)

> killing the process from other terminal produces:
> 
> [Current thread is 1 (Thread 0x7ffff7fc5740 (LWP 7429))]
> (gdb) bt
> #0  0x00007ffff632d230 in __write_nocancel () from /lib64/libc.so.6
> #1  0x00007ffff62c4dff in _IO_new_file_write () from /lib64/libc.so.6
> #2  0x00007ffff62c4403 in new_do_write () from /lib64/libc.so.6
> #3  0x00007ffff62c5d09 in __GI__IO_do_write () from /lib64/libc.so.6
> #4  0x00007ffff62c5417 in __GI__IO_file_xsputn () from /lib64/libc.so.6
> #5  0x00007ffff6299cdb in vfprintf () from /lib64/libc.so.6
> #6  0x00007ffff62a03f7 in fprintf () from /lib64/libc.so.6
> #7  0x00000000004ef12c in hist_entry__fprintf (he=he@entry=0x1c62b30, size=<optimized out>, size@entry=0, hists=hists@entry=0x1813818, 
                                                                              ^^^^^^^^^^^^^^
                                                                              

>     bf=bf@entry=0x1d5cd40 "     0.08%  cc1plus   cc1plus", ' ' <repeats 11 times>, "[.] _Z25number_of_iterations_exitP4loopP8edge_defP15tree_niter_descbb", ' ' <repeats 91 times>..., bfsz=bfsz@entry=479, fp=fp@entry=0x7ffff65f0640 <_IO_2_1_stdout_>)
>     at ui/stdio/hist.c:427
> #8  0x00000000004ef549 in hists__fprintf (hists=hists@entry=0x1813818, show_header=show_header@entry=true, max_rows=max_rows@entry=0, max_cols=max_cols@entry=0, min_pcnt=0, fp=0x7ffff65f0640 <_IO_2_1_stdout_>) at ui/stdio/hist.c:534
> #9  0x000000000042d6a3 in perf_evlist__tty_browse_hists (evlist=0x1812c90, rep=rep@entry=0x7fffffffc6e0, help=help@entry=0x515948 "For a higher level overview, try: perf report --sort comm,dso") at builtin-report.c:370
> #10 0x000000000042d7d2 in report__browse_hists (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:455
> #11 0x000000000042d992 in __cmd_report (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:571
> #12 0x000000000042ec1f in cmd_report (argc=0, argv=0x7fffffffde00, prefix=<optimized out>) at builtin-report.c:957
                                                                             ^^^^^^^^^^^^^^


> #13 0x000000000046c496 in run_builtin (p=p@entry=0x7771a0 <commands+192>, argc=argc@entry=1, argv=argv@entry=0x7fffffffde00) at perf.c:387
> #14 0x000000000046c693 in handle_internal_command (argc=1, argv=0x7fffffffde00) at perf.c:448
> #15 0x000000000046c6fe in run_argv (argcp=argcp@entry=0x7fffffffdc6c, argv=argv@entry=0x7fffffffdc60) at perf.c:492
> #16 0x000000000046c94c in main (argc=1, argv=0x7fffffffde00) at perf.c:609
> 
> Which is fine.

marked 2 instances of 'optimized out' cases above in your output

> 
> I've been using GCC 5.2. What version are you using?

5.1.1

> I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.
> 
> I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.

if you run TUI, you dont need to be fast ;-) make sure you compile with slang devel pkg

thanks.
jirka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-07 14:16       ` Jiri Olsa
@ 2015-12-10 13:07         ` Martin Liška
  2015-12-10 13:24           ` Jiri Olsa
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Liška @ 2015-12-10 13:07 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Namhyung Kim, Peter Zijlstra

On 12/07/2015 03:16 PM, Jiri Olsa wrote:
> On Mon, Dec 07, 2015 at 03:04:27PM +0100, Martin Liška wrote:
> 
> SNIP
> 
>> Hi.
>>
>> Unfortunately, running 'perf report' for a medium-size report is very fast a
> 
> not if you use TUI ;-)
> 
>> killing the process from other terminal produces:
>>
>> [Current thread is 1 (Thread 0x7ffff7fc5740 (LWP 7429))]
>> (gdb) bt
>> #0  0x00007ffff632d230 in __write_nocancel () from /lib64/libc.so.6
>> #1  0x00007ffff62c4dff in _IO_new_file_write () from /lib64/libc.so.6
>> #2  0x00007ffff62c4403 in new_do_write () from /lib64/libc.so.6
>> #3  0x00007ffff62c5d09 in __GI__IO_do_write () from /lib64/libc.so.6
>> #4  0x00007ffff62c5417 in __GI__IO_file_xsputn () from /lib64/libc.so.6
>> #5  0x00007ffff6299cdb in vfprintf () from /lib64/libc.so.6
>> #6  0x00007ffff62a03f7 in fprintf () from /lib64/libc.so.6
>> #7  0x00000000004ef12c in hist_entry__fprintf (he=he@entry=0x1c62b30, size=<optimized out>, size@entry=0, hists=hists@entry=0x1813818, 
>                                                                               ^^^^^^^^^^^^^^
>                                                                               
> 
>>     bf=bf@entry=0x1d5cd40 "     0.08%  cc1plus   cc1plus", ' ' <repeats 11 times>, "[.] _Z25number_of_iterations_exitP4loopP8edge_defP15tree_niter_descbb", ' ' <repeats 91 times>..., bfsz=bfsz@entry=479, fp=fp@entry=0x7ffff65f0640 <_IO_2_1_stdout_>)
>>     at ui/stdio/hist.c:427
>> #8  0x00000000004ef549 in hists__fprintf (hists=hists@entry=0x1813818, show_header=show_header@entry=true, max_rows=max_rows@entry=0, max_cols=max_cols@entry=0, min_pcnt=0, fp=0x7ffff65f0640 <_IO_2_1_stdout_>) at ui/stdio/hist.c:534
>> #9  0x000000000042d6a3 in perf_evlist__tty_browse_hists (evlist=0x1812c90, rep=rep@entry=0x7fffffffc6e0, help=help@entry=0x515948 "For a higher level overview, try: perf report --sort comm,dso") at builtin-report.c:370
>> #10 0x000000000042d7d2 in report__browse_hists (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:455
>> #11 0x000000000042d992 in __cmd_report (rep=rep@entry=0x7fffffffc6e0) at builtin-report.c:571
>> #12 0x000000000042ec1f in cmd_report (argc=0, argv=0x7fffffffde00, prefix=<optimized out>) at builtin-report.c:957
>                                                                              ^^^^^^^^^^^^^^
> 
> 
>> #13 0x000000000046c496 in run_builtin (p=p@entry=0x7771a0 <commands+192>, argc=argc@entry=1, argv=argv@entry=0x7fffffffde00) at perf.c:387
>> #14 0x000000000046c693 in handle_internal_command (argc=1, argv=0x7fffffffde00) at perf.c:448
>> #15 0x000000000046c6fe in run_argv (argcp=argcp@entry=0x7fffffffdc6c, argv=argv@entry=0x7fffffffdc60) at perf.c:492
>> #16 0x000000000046c94c in main (argc=1, argv=0x7fffffffde00) at perf.c:609
>>
>> Which is fine.
> 
> marked 2 instances of 'optimized out' cases above in your output
> 
>>
>> I've been using GCC 5.2. What version are you using?
> 
> 5.1.1
> 
>> I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.
>>
>> I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.
> 
> if you run TUI, you dont need to be fast ;-) make sure you compile with slang devel pkg
> 
> thanks.
> jirka
> 

Hello.

I've just created PR for GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836

According to discussing with Jakub Jelinek, that's a semi-known issues that's going to be eventually fixed.

Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-10 13:07         ` Martin Liška
@ 2015-12-10 13:24           ` Jiri Olsa
  2015-12-10 15:13             ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2015-12-10 13:24 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Namhyung Kim, Peter Zijlstra

On Thu, Dec 10, 2015 at 02:07:35PM +0100, Martin Liška wrote:

SNIP

> > 
> >> I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.
> >>
> >> I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.
> > 
> > if you run TUI, you dont need to be fast ;-) make sure you compile with slang devel pkg
> > 
> > thanks.
> > jirka
> > 
> 
> Hello.
> 
> I've just created PR for GCC:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836

cool, thanks

jirka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-10 13:24           ` Jiri Olsa
@ 2015-12-10 15:13             ` Arnaldo Carvalho de Melo
  2015-12-11  9:17               ` Martin Liška
  0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-10 15:13 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Martin Liška, Jiri Olsa, lkml, David Ahern, Ingo Molnar,
	Namhyung Kim, Peter Zijlstra

Em Thu, Dec 10, 2015 at 02:24:00PM +0100, Jiri Olsa escreveu:
> On Thu, Dec 10, 2015 at 02:07:35PM +0100, Martin Liška wrote:
> 
> SNIP
> 
> > > 
> > >> I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.
> > >>
> > >> I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.
> > > 
> > > if you run TUI, you dont need to be fast ;-) make sure you compile with slang devel pkg
> > > 
> > > thanks.
> > > jirka
> > > 
> > 
> > Hello.
> > 
> > I've just created PR for GCC:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836
> 
> cool, thanks

I'll add this in the revert commit.

- Arnaldo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC] The -Og debugging experience
  2015-12-10 15:13             ` Arnaldo Carvalho de Melo
@ 2015-12-11  9:17               ` Martin Liška
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Liška @ 2015-12-11  9:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Jiri Olsa, lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra

On 12/10/2015 04:13 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Dec 10, 2015 at 02:24:00PM +0100, Jiri Olsa escreveu:
>> On Thu, Dec 10, 2015 at 02:07:35PM +0100, Martin Liška wrote:
>>
>> SNIP
>>
>>>>
>>>>> I've also tried to run './perf test' and terminate the process at random places, but the back trace was OK.
>>>>>
>>>>> I would appreciate if you send me a patch that causes a segfault that is wrongly displayed.
>>>>
>>>> if you run TUI, you dont need to be fast ;-) make sure you compile with slang devel pkg
>>>>
>>>> thanks.
>>>> jirka
>>>>
>>>
>>> Hello.
>>>
>>> I've just created PR for GCC:
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836
>>
>> cool, thanks
> 
> I'll add this in the revert commit.
> 
> - Arnaldo
> 

Thanks.

Let's wait for the proper fix before re-enabling -Og optimization level.

Martin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [tip:perf/core] Revert "perf tools: Improve setting of gcc debug option"
  2015-12-02 16:48 [RFC] The -Og debugging experience Jiri Olsa
  2015-12-03  8:29 ` Ingo Molnar
  2015-12-07 10:48 ` Martin Liška
@ 2015-12-14  8:15 ` tip-bot for Arnaldo Carvalho de Melo
  2 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2015-12-14  8:15 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, mingo, acme, tglx, jolsa, mliska, linux-kernel, dsahern, hpa

Commit-ID:  8488335c039ff4917754332763e21c01a81435b4
Gitweb:     http://git.kernel.org/tip/8488335c039ff4917754332763e21c01a81435b4
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Tue, 8 Dec 2015 16:51:24 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 10 Dec 2015 16:09:40 -0300

Revert "perf tools: Improve setting of gcc debug option"

This reverts commit e8b7ea4356fdd3c4de5478f3418eb84f8dce2b61.

Martin created a gcc PR:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68836

Reported-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Martin Liska <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>,
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20151202164827.GA21124@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile      |  2 --
 tools/perf/config/utilities.mak | 19 -------------------
 2 files changed, 21 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 6eb9a95..a552417 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -135,8 +135,6 @@ endif
 
 ifeq ($(DEBUG),0)
   CFLAGS += -O6
-else
-  CFLAGS += $(call cc-option,-Og,-O0)
 endif
 
 ifdef PARSER_DEBUG
diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index 0ebef09..c16ce83 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -177,22 +177,3 @@ $(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2)))
 endef
 _ge_attempt = $(if $(get-executable),$(get-executable),$(call _gea_err,$(2)))
 _gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))
-
-# try-run
-# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
-# Exit code chooses option. "$$TMP" is can be used as temporary file and
-# is automatically cleaned up.
-try-run = $(shell set -e;		\
-	TMP="$(TMPOUT).$$$$.tmp";	\
-	TMPO="$(TMPOUT).$$$$.o";	\
-	if ($(1)) >/dev/null 2>&1;	\
-	then echo "$(2)";		\
-	else echo "$(3)";		\
-	fi;				\
-	rm -f "$$TMP" "$$TMPO")
-
-# cc-option
-# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
-
-cc-option = $(call try-run,\
-	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-12-14  8:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-02 16:48 [RFC] The -Og debugging experience Jiri Olsa
2015-12-03  8:29 ` Ingo Molnar
2015-12-07 10:48 ` Martin Liška
2015-12-07 13:45   ` Jiri Olsa
2015-12-07 14:04     ` Martin Liška
2015-12-07 14:16       ` Jiri Olsa
2015-12-10 13:07         ` Martin Liška
2015-12-10 13:24           ` Jiri Olsa
2015-12-10 15:13             ` Arnaldo Carvalho de Melo
2015-12-11  9:17               ` Martin Liška
2015-12-14  8:15 ` [tip:perf/core] Revert "perf tools: Improve setting of gcc debug option" tip-bot for Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.