01.12.2012 Views

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

190 M. Sch<strong>in</strong>dewolf, D. Kramer, and M. C<strong>in</strong>tra<br />

On the other hand application level knowledge that is still available at compile<br />

time (names <strong>of</strong> loop variables, trip counts, orig<strong>in</strong> <strong>of</strong> code fragments (source file<br />

and l<strong>in</strong>e), etc.) may be lost at b<strong>in</strong>ary level or is difficult to reconstruct.<br />

Compared with the surveyed related work based on simulation, statistical<br />

methods or <strong>in</strong>corporat<strong>in</strong>g an array <strong>of</strong> different models, our approach contributes<br />

compiler-directed models. In contrast to the complex model construction process<br />

favored <strong>in</strong> the related work, we restrict ourselves to present simplistic models<br />

based on quadratic programm<strong>in</strong>g to show the validity <strong>of</strong> the compiler-based<br />

approach. Our approach is expected to <strong>in</strong>tegrate with the model<strong>in</strong>g assertions<br />

approach and, thus, may greatly simplify the construction <strong>of</strong> more sophisticated<br />

performance models (e.g. symbolic models) <strong>of</strong> unknown workloads.<br />

3 Framework<br />

The follow<strong>in</strong>g section describes the implementation aspects <strong>of</strong> our work. Figure 1<br />

shows the tool cha<strong>in</strong> and the section is organized top-down. First, a description<br />

<strong>of</strong> the compiler passes is given. Afterwards, this section describes the implementation<br />

<strong>of</strong> the MA library sketch<strong>in</strong>g the actions taken at run-time. At last,<br />

the post-process<strong>in</strong>g tools are covered, address<strong>in</strong>g the tool to validate predictions<br />

aga<strong>in</strong>st <strong>in</strong>formation retrieved from performance counters as well as aspects <strong>of</strong><br />

the model construction.<br />

3.1 GCC-PME<br />

This section shows the basic design decisions for the implementation <strong>of</strong> the compiler<br />

extension. The ”PME” extension to the name GCC underl<strong>in</strong>es the program<br />

model<strong>in</strong>g enhancements to the tree structure <strong>of</strong> GCC (version 4.2.0). S<strong>in</strong>ce the<br />

user needs some means to <strong>in</strong>fluence the model<strong>in</strong>g process, new compiler options<br />

are <strong>in</strong>troduced. These options <strong>in</strong>fluence the <strong>in</strong>strumentation process so that only<br />

selected parts are <strong>in</strong>strumented. These parts are determ<strong>in</strong>ed by an operation<br />

count pass, which visits all basic blocks and gathers <strong>in</strong>formation. After process<strong>in</strong>g<br />

this <strong>in</strong>formation, the user-specified code parts rema<strong>in</strong> and are <strong>in</strong>strumented<br />

by a separate <strong>in</strong>strumentation pass.<br />

Compiler Options. This section briefly <strong>in</strong>troduces the additional compiler options.<br />

The optimization switch -O1 enables GCC’s loop analysis and additional<br />

PME passes rely on the results <strong>of</strong> this analysis. The options ma-float-cov,<br />

ma-<strong>in</strong>t-cov, andma-ls-cov are used to specify the relative amount <strong>of</strong> float<strong>in</strong>g<br />

po<strong>in</strong>t, <strong>in</strong>teger, or load/store operations to be annotated <strong>in</strong> the executable.<br />

Additionally, the ma-call-cov annotates the function calls with a call to the<br />

MA-library conta<strong>in</strong><strong>in</strong>g the function name. To provide an <strong>in</strong>tuitive <strong>in</strong>terface for<br />

the programmer, command l<strong>in</strong>e values are given <strong>in</strong> per cent <strong>of</strong> the estimated total<br />

amount <strong>of</strong> operations. The amount <strong>of</strong> operations a program performs, depends<br />

on the control flow. Loops, for <strong>in</strong>stance, are prom<strong>in</strong>ent programm<strong>in</strong>g constructs<br />

<strong>in</strong>troduc<strong>in</strong>g control flow and, thus, <strong>in</strong>fluenc<strong>in</strong>g the amount <strong>of</strong> operations. Depend<strong>in</strong>g<br />

on the exit condition <strong>of</strong> a loop, loop bounds may be derived at compile

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!