Segment Flags.................................................................................................................

196

Mapfile Segment Declaration Examples..............................................................................

197

Defining Mapfile Section Mapping Directives...........................................................................

197

Internal Map Structure...........................................................................................................

198

Placement of Segments in an Executable.............................................................................

198

Mapping Input Sections to Segments..................................................................................

198

Interaction between User-defined and Default Mapfile Directives.............................................

200

Mapfile Option Error Messages..............................................................................................

200

Fatal Errors.....................................................................................................................

200

Warnings ......................................................................................................................

201

10 Improving Your Application Performance..................................................

202

Linker Optimizations..............................................................................................................

202

Invoking Linker Optimizations from the Compile Line.............................................................

202

Incompatibilities with other Options ...................................................................................

203

Unused Procedure Elimination with +Oprocelim...................................................................

203

Complete Executables..................................................................................................

203

Incomplete Executables................................................................................................

204

Shared Libraries..........................................................................................................

204

Retain Unreferenced Symbols with +noprocelim_sym........................................................

204

Relocatable Objects....................................................................................................

204

Affects on Symbolic Debugging....................................................................................

204

Profile-Based Optimization (PA-RISC)..................................................................................

204

General Information about PBO....................................................................................

204

Using PBO ................................................................................................................

205

When to Use PBO.......................................................................................................

205

How to Use PBO.........................................................................................................

205

Instrumenting (+I/-I).....................................................................................................

206

The Startup File icrt0.o............................................................................................

207

The -I Linker Option.................................................................................................

207

Code Generation from I-SOMs.................................................................................

207

Building Portable Code with Linker Optimization.........................................................

208

Profiling.....................................................................................................................

208

Choosing Input Data...............................................................................................

208

The flow.data File...................................................................................................

208

Storing Profile Information for Multiple Programs.........................................................

209

Sharing the flow.data File Among Multiple Processes..................................................

209

Forking an Instrumented Application.........................................................................

210

Optimizing Based on Profile Data (+P/-P).......................................................................

210

The -P Linker Option................................................................................................

210

Using The flow.data File..........................................................................................

211

Specifying a Different flow.data File with +df..............................................................

211

Specifying a Different flow.data with FLOW_DATA......................................................

211

Interaction between FLOW_DATA and +df ................................................................

211

Specifying a Different Program Name (+pgm)............................................................

211

Selecting an Optimization Level with PBO.......................................................................

212

Using PBO to Optimize Shared Libraries........................................................................

212

Using PBO with ld -r....................................................................................................

213

Restrictions and Limitations of PBO................................................................................

214

Temporary Files......................................................................................................

214

Source Code Changes and PBO..............................................................................

214

Profile-Based Optimization (PBO) and High-Level Optimization (HLO)............................

214

I-SOM File Restrictions.............................................................................................

215

Compatibility with 9.0 PBO.....................................................................................

216

Compatibility with 9.0 PBO..........................................................................................

216

Contents 11