Bug 521796 - gcc profiling support is broken
Summary: gcc profiling support is broken
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.3
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-08 11:32 UTC by Giorgos Mavrikas
Modified: 2013-11-13 14:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-13 14:44:22 UTC


Attachments (Terms of Use)

Description Giorgos Mavrikas 2009-09-08 11:32:39 UTC
Description of problem:

GCC has options for adding profiling core within an application, running the application and then recompiling it with the data collected during the profiled run. This is broken with gcc 4.1.2 and gcc 4.3.2

Version-Release number of selected component (if applicable):
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
gcc43 (GCC) 4.3.2 20081007 (Red Hat 4.3.2-7)

How reproducible:
Every time.

Steps to Reproduce:
1. Get crafty Chess version 23.0 source code (http://www.craftychess.com/crafty-23.0.zip) and unzip it.

2. Compile the crafty source code with profiling support (make linux-amd64-profile)

3. Run a crafty benchmark with the binary for profiling (./crafty mt=4 bench quit)

4. Remove old object files for a new compilation, keep the profile files (make clean)

5. Recompile crafty using the profile files (make linux-amd64)
  
Actual results:
gcc reports that the profile files are invalid:
crafty.c: In function ‘ValidMove’:
crafty.c:54: error: corrupted profile info: number of executions for edge 59-60 thought to be 2736212
crafty.c:54: error: corrupted profile info: number of executions for edge 59-61 thought to be -4
crafty.c: In function ‘HashProbe’:
crafty.c:54: error: corrupted profile info: number of executions for edge 15-16 thought to be -214847
crafty.c:54: error: corrupted profile info: number of iterations for basic block 16 thought to be -214847
crafty.c:54: error: corrupted profile info: number of executions for edge 16-17 thought to be -214847
crafty.c:54: error: corrupted profile info: number of iterations for basic block 17 thought to be -214847
crafty.c:54: error: corrupted profile info: number of executions for edge 17-26 thought to be -214847


Expected results:
gcc should compile the profiled source code.

Additional info:

Hardware platform: IBM LS21

Comment 1 Jeff Law 2013-11-13 14:43:55 UTC
This Bugzilla has been reviewed by Red Hat and is not planned on being
addressed in Red Hat Enterprise Linux 5, and therefore will be closed.
If this bug is critical to production systems, please contact your Red
Hat support representative and provide sufficient business
justification.


Note You need to log in before you can comment on or make changes to this bug.