From: Jiri Olsa <jolsa@redhat.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Martin Liska <mliska@suse.cz>
Subject: [RFC] The -Og debugging experience
Date: Wed, 2 Dec 2015 17:48:27 +0100 [thread overview]
Message-ID: <20151202164827.GA21124@krava.brq.redhat.com> (raw)
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
next reply other threads:[~2015-12-02 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 16:48 Jiri Olsa [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151202164827.GA21124@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mliska@suse.cz \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®