21.01.2013 Views

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

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.

292 R. Lev<strong>in</strong>, I. Newman, and G. Haber<br />

on typical workloads and then uses this data to produce a highly optimized version.<br />

F<strong>in</strong>ally, static profil<strong>in</strong>g can be used by compilers as a method for predict<strong>in</strong>g program’s<br />

control flow, but such methods are not as effective as the previously mentioned<br />

options [4].<br />

Collect<strong>in</strong>g full edge profile requires creat<strong>in</strong>g <strong>in</strong>strumented code with edge counters<br />

that will <strong>in</strong>crement upon execution and persist this data, typically by mapp<strong>in</strong>g it to some<br />

file. Thomas Ball and James R. Larus suggest algorithms for optimally <strong>in</strong>sert<strong>in</strong>g<br />

monitor<strong>in</strong>g code to profile and trace programs and they report a slowdown of between<br />

9% to 105% when compar<strong>in</strong>g the orig<strong>in</strong>al b<strong>in</strong>ary to the <strong>in</strong>strumented one [1]. Due to<br />

this slowdown, along with the extra build step which is required for <strong>in</strong>strumentation<br />

which also <strong>in</strong>creases the complexity of the compilation/build process, many consider<br />

alternative approaches such as low overhead profil<strong>in</strong>g [2]. In real time embedded<br />

applications another problem arises, as <strong>in</strong>trusive <strong>in</strong>strumentation code may alter realtime<br />

application behavior as a result of deadl<strong>in</strong>es <strong>in</strong> the real time program that may be<br />

missed [21]. Therefore collect<strong>in</strong>g profile for real-time applications calls for less<br />

<strong>in</strong>trusive profile collection techniques, such as low rate sampl<strong>in</strong>g, selective<br />

<strong>in</strong>strumentation or runn<strong>in</strong>g the <strong>in</strong>strumented b<strong>in</strong>ary <strong>in</strong> a mach<strong>in</strong>e which is significantly<br />

stronger than target mach<strong>in</strong>e. However, us<strong>in</strong>g sampl<strong>in</strong>g techniques or selective<br />

<strong>in</strong>strumentation will produce both <strong>in</strong>accurate and lack<strong>in</strong>g profile <strong>in</strong>formation which may<br />

result <strong>in</strong> sub-optimal performance of an application optimized accord<strong>in</strong>g to this profile.<br />

e7 (P=90%)<br />

e3<br />

100<br />

0<br />

0 75<br />

100<br />

0<br />

e1<br />

e6<br />

e2<br />

e5<br />

e8<br />

100<br />

100<br />

25 75<br />

Fig. 1. – Partial vertex profile Fig. 2. – The complete vertex profile<br />

In this work, we present a new edge profile estimation algorithm based on given<br />

partial and possibly <strong>in</strong>accurate vertex counts with costs attached to the edges and<br />

vertices. Our edge profile estimation is translated to the M<strong>in</strong>imum Cost Circulation<br />

Problem [5], which <strong>in</strong>fuses a legal circulation <strong>in</strong> a flow network while keep<strong>in</strong>g the<br />

weighted flow-costs on the edges at a m<strong>in</strong>imum. The assumption is that by creat<strong>in</strong>g a<br />

legal network flow, while m<strong>in</strong>imiz<strong>in</strong>g some criteria for the amount of global change<br />

100<br />

100

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

Saved successfully!

Ooh no, something went wrong!