public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le @ 2014-09-24 6:52 anton at samba dot org 2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: anton at samba dot org @ 2014-09-24 6:52 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63354 Bug ID: 63354 Summary: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: anton at samba dot org The following testcase: int foo(void) { return 1; } compiled with: gcc -O2 -pg -mprofile-kernel -S foo.c produces an unused stack frame: foo: mflr 0 std 0,16(1) bl _mcount mflr 0 li 3,1 std 0,16(1) stdu 1,-32(1) addi 1,1,32 ori 2,2,0 ld 0,16(1) mtlr 0 blr Note that older gcc versions allowed -mprofile-kernel to used on its own. While there are issues with that (eg ignoring attribute no_instrument_function), it does show the expected behaviour: gcc -O2 -mprofile-kernel -S foo.c foo: mflr 0 std 0,16(1) bl _mcount li 3,1 blr So it seems to be something to do with -pg. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/63354] gcc -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le 2014-09-24 6:52 [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le anton at samba dot org @ 2014-09-24 14:31 ` segher at gcc dot gnu.org 2014-09-25 1:45 ` anton at samba dot org 2015-03-10 2:36 ` msebor at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: segher at gcc dot gnu.org @ 2014-09-24 14:31 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63354 Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|powerpc64le-linux |powerpc*-*-* Status|UNCONFIRMED |NEW Last reconfirmed| |2014-09-24 CC| |segher at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> --- Confirmed. We need #define TARGET_KEEP_LEAF_WHEN_PROFILED hook_bool_void_true to have it behave as you want. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/63354] gcc -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le 2014-09-24 6:52 [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le anton at samba dot org 2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org @ 2014-09-25 1:45 ` anton at samba dot org 2015-03-10 2:36 ` msebor at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: anton at samba dot org @ 2014-09-25 1:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63354 --- Comment #2 from Anton Blanchard <anton at samba dot org> --- Created attachment 33555 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33555&action=edit Avoid an unused stack frame for -mprofile-kernel profiling on leaf functions. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/63354] gcc -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le 2014-09-24 6:52 [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le anton at samba dot org 2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org 2014-09-25 1:45 ` anton at samba dot org @ 2015-03-10 2:36 ` msebor at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: msebor at gcc dot gnu.org @ 2015-03-10 2:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63354 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- The attached patch still fixes the problem. Anton, would you like to submit the patch to gcc-patches? ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-10 2:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-09-24 6:52 [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le anton at samba dot org 2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org 2014-09-25 1:45 ` anton at samba dot org 2015-03-10 2:36 ` msebor at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).