Browse Prior Art Database

Finding and Fixing PowerPC Emulation Performance/Functional Problems

IP.com Disclosure Number: IPCOM000117634D
Original Publication Date: 1996-Apr-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 84K

Publishing Venue

IBM

Related People

Dixit, KM: AUTHOR [+2]

Abstract

Older, legacy, POWER binaries (executable programs) typically contain instructions which have been deleted from the PowerPC* architecture and do not exist in the PowerPC 601 or 604. In order to maintain and claim binary compatibility, the operating system (AIX* for example) must (and does) provide emulation routines for these deleted instructions which get control when an attempt is made to execute a deleted instruction and provide functionally equivalent behavior. However, there is a severe performance penalty incurred for emulating these deleted instructions which can typically result in 2X to 10X (and potentially upwards of 100X) degradations in performance due to the kernel context switch incurred to service the illegal instruction exception (which eventually invokes the emulation code).

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Finding and Fixing PowerPC Emulation Performance/Functional Problems

      Older, legacy, POWER binaries (executable programs) typically
contain instructions which have been deleted from the PowerPC*
architecture and do not exist in the PowerPC 601 or 604.  In order to
maintain and claim binary compatibility, the operating system (AIX*
for example) must (and does) provide emulation routines for these
deleted instructions which get control when an attempt is made to
execute a deleted instruction and provide functionally equivalent
behavior.  However, there is a severe performance penalty incurred
for emulating these deleted instructions which can typically result
in 2X to 10X (and potentially upwards of 100X) degradations in
performance due to the kernel context switch incurred to service the
illegal instruction exception (which eventually invokes the emulation
code).

      The proposed solution provides a methodology to detect, locate,
and replace any "undesirable" instructions in an existing binary.
The Customer would not require the source code for the application of
interest and could "inoculate" the executable program itself against
unexpected performance degradation.

      Previous work has been done to assist with the emulation
performance problem.  The Power Binary Analyzer (PBA) tool was
developed and made available to customers prior to the first PowerPC
product.  This tool statically analyzed existing binaries and
attempted to help a customer/ISV/etc.  determine the extent of
deleted instructions and potential performance degradation so as to
aid in planning for migration to the new platform.

      This approach, however, has several critical limitations which
include the difficulties in statically analyzing an XCOFF executable
image as well as the problem of statically determining instruction
execution frequencies.  It is impossible to guarantee the distinction
of program constant data, data stored in the text section of a
program for branch tables/constants/etc., from actual instructions in
an executable program image which makes guaranteed detection/analysis
let alone modification or p...