Programming Languages & Tools
Total Page:16
File Type:pdf, Size:1020Kb
I PROGRAMMING LANGUAGES & TOOLS Volume 10 Number 1 1998 Editorial The Digital Technicaljoumalis a refereed AlphaServer, Compaq, tl1e Compaq logo, jane C. Blake, Managing Editor journal published quarterly by Compaq DEC, DIGITAL, tl1e DIGITAL logo, 550 ULTIUX, Kathleen M. Stetson, Editor Computer Corporation, King Street, VAX,and VMS are registered 01460-1289. Hden L. Patterson, Editor LKGI-2jW7, Littleton, MA in the U.S. Patent and Trademark Office. Hard-copy subscriptions can be ordered by DIGITAL UNIX, FX132, and OpenVMS Circulation sending a check in U.S. funds (made payable arc trademarks of Compaq Computer Kristine M. Lowe, Administrator to Compaq Computer Corporation) to the Corporation. published-by address. General subscription Production rates arc $40.00 (non-U.S. $60) for four issues Intel and Pentium are registered u·ademarks $75.00 $115) Christa W. Jessica, Production Editor and (non-U.S. for eight issues. of Intel Corporation. University and college professors and Ph.D. Elizabeth McGrail, Typographer I lUX is a registered trademark of Silicon students in the elecu·icaJ engineering and com Peter R. Woodbury, Illustrator Graphics, Inc. puter science fields receive complimentary sub scriptions upon request. Compaq customers Microsoft, Visual C++, Windows, and Advisory Board may qualify tor giftsubscriptions and arc encour Windows NT are registered trademarks Thomas F. Gannon, Chairman (Acting) aged to contact tl1eir sales representatives. of Microsoft Corporation. Scott E. Cutler Donald Z. Harbert Electronic subscriptions are available at MIPS is a registered trademark of MIPS William A. Laing no charge by accessing URL Technologies, Inc. Richard F. Lary http:jjwww.digital.com/subscription. NULLSTONE is a trademark ofNullstonc Alan G. Nemeth This service will send an electronic mail notification when a new issue is available Corporation. Robcrt M. Supnik on the Internet. Roque Wave and .h++ are registered trade Single copies and back issues can be ordered marks of Roque Wave Software, Inc. by sending tl1e requested issue's volume and RS/6000 is a registered trademark of number and a check for $16.00 (non-U.S. International Business Machines C01voration. $18) each to tl1e published-by address. Recent issues arc also available on me Internet at Solaris is a registered trademark of Sun http://www.digital.com/ dtj. Microsysrems, Inc. Compaq employees may order subscrip SPARC is a registered trademark of SPARC tions through Readers Choice at URL International,Inc. http://web rc.das.dec.com. SPEC and SPECint are registered trademarks Inquiries, address changes, and compli of Standard Performance Evaluation mentary subscription orders can be sent Corporation. to the Dlj!,ital Technica/Joumal at tl1e published-by address or tl1e electronic UNIX is a registered trademark in the United mail address, [email protected]. Inquiries States and in other countries, licensed exclu can also be made by calling U1e.fournal sively through X/Open Company Ltd. office at 978-506-6858. Other product and company names mentioned Comments on the content of any paper and herein may be trademarks and/or registered requests to contact autl1ors are welcomed trademarks of their respective owners. and may be sent to tl1e managing editor at tl1e published-by or electronic mail address. Copyright© 1998 Compaq Computer Corporation. Copying wimout fee is per mitted provided that such copies are made f·or usc in educational institutions by faculty members and are not distributed for com mercial advantage. Absu·acting with credit of Compaq Computer Corporation's author ship is permitted. The information in tl1e journalis subject to change without notice and should not be construed as a commitment by Compaq Computer Corporation or by the compa nies herein represented. Compaq Computer Corporation assumes no responsibility for any errors that may appear in t11e./OII/'I/Cii. ISSN 0898-90IX Documentation Number EC-P9706-I8 Book production was done by Quantic Communications, Inc. Cover Design This special issue of the jounw/ focuses on Programming Languages & Tools, specifi cally on compiler software. For the cover, wc have chosen the alchemist who trans forms common elements into precious gold to represent the compiler developer who transforms code to extract the highest per formance possible for software applications. The cover was designed by Lucinda O'Neill of the Compaq Industria! and Graphic Design Group. December 1998 A letter to readers of the Dip,ital Technicaljournal This issue is the last Digital Technicaljournal to be published. Since 1985, the Journal has been privileged to publish intormation about significantengineeting accomplishments for DIGITAL, including standards-setting network and storage teclmologies, industry-leading VAX.systems, record-breaking Alpha microproces sors and semiconductor technologies, and advanced application software and performance tools. The Journal has been rewarded by continual growth in rhe number of readers and by rheir expressions of appreciation for the quality of content a.nd presentation. The editors dunk rhe engineers who somehow made d1e time to write, the engi neering managers who supported rhem, rhe consulting engineers and professors who reviewed manuscripts and made rhe process a learning experience for all of us, and, of course, the readers who are the reason the Journal came into existence 13 years ago. With kind regards, Jane Blake Managing Editor Kathleen Stetson Editor Helen Patterson Editor Digital Technical Journal Volume 10 Number 1 Contents Introduction C. Robert Morgan, Guest Editor 2 Foreword William C. Blake 4 Tracing and Characterization of Windows NT-based Jason P. Casmira, David P. Hunter, 6 System Workloads and David R. Kaeli Automatic Template Instantiation in DIGITAL C++ Avrum E. Itzkowitz and Lois D. Foltan 22 Measurement and Analysis of C and C++ Performance Hemant G. Rotithor, Kevin W. Harris, 32 and Mark W. Davis Alias Analysis in the DEC C and DIGITAL C++ Compilers August G. Reinig 48 Compiler Optimization for Superscalar Systems: P hilip H. Sweany, Steven M. Carr, 58 Global Instruction Scheduling without Copies and Brett L. Huber Maximizing Multiprocessor Performance Mary W. Hall, Jennifer M. Anderson, 71 with the SUIF Compiler Saman P. Amarasinghe, Brian R. Murphy, Shih-Wei Liao, Eduoard Bugnion, :md Monica S. Lam Debugging Optimized Code: Concepts and Ronald F. Brender, Jeffrey E. Nelson, 81 Implementation on DIGITAL Alpha Systems and Mark E. Arsenault Differential Testing for Software William M. McKeeman 100 Introduction The complexity of high-performance Profiling describes the point in the systems and d1e need tor ever-increased program that is most frequently performance to be gained from those executed. Tracing describes the systems creates a challenge for engi commonly executed sequence of neers, one d1at requires bod1 experience instructions. In addition to helping and innovation in the development developers build more efficient of software tools. The papers in this applications, this information assists issue of tJ1e]ournal are a few selected designers and implementers of future examples of the work performed Windows NT systems. within Compaq and by researchers Every compiler consists of two C. Robert Morgan Senior Consulting Engineer and worldwide to advance me state of me components: the front end, which Technical Program Manage1; art. In fact, Compaq supports rele analyzes the specific language, and Core Technology Croup vant research in programming lan the back end, which generates opti guages and tools. mized instructions for the target Compaq has been developing machine. An efficient compiler is a high-performance tools for more balance of both components. As lan than thirty years, starting with the guages such as C++ evolve, the com Fortran compiler for the DIGITAL piler front end must also evolve to PDP-10, introduced in 1967. Later keep pace. C++ has now been stan compilers and tools for VAX com dardized, so evolutionary changes puter systems, introduced in 1977, will Jessen. However, compiler devel made the VA.'< system one of me most opers must continue to improve usable in history. The compilers and front-end techniques for implement debugger for VAXjVMS are exem ing the language to ensure ever better plary. With the introduction of the application performance. An impor VfuY.. successor in 1992, the 64-bit tant feature of C++ compiler develop RISC Alpha systems, Compaq has ment is C++ templates. Templates continued me traditionof developing may be implemented in multiple advanced tools that accelerate appli ways, with varying effects on appli cation performance and usability for cation programs. The paper by system users. The papers, however, Itzkowitz and Foltan describes represent not only the work of Compaq's efficient implementation Compaq engineers but aJso that of of templates. On a related subject, researchers and academics who are Rotid1or, Hanis, and Davis describe working on problems and advanced a systematic approach Compaq has techniques of interest to Compaq. developed for monitoring and The paper on cbaractetization of improving C++ compiler perfor system workloads by Casmira, Hw1ter, mance to minimize cost and maxi and Kaeli addresses the capture of mize function and reliability. basic data needed for me development Improved optimization techniques of tools and high-performance appli for compiler back ends are presented cations. The authors' work focuses in three papers. In the firsto f d1ese, on generating