Post on 11-Jul-2015
Program Analysis @ Google
Robert Hundt, Platformsrhundt@google.com
Open64 Workshop, CGO, 3/11/2007
Open64 Tutorial, CGO 2007
Challenges
Google Applications
• Large and complicated
• Distributed and irregular
• Max out gcc FE space
• Well tuned, manually
Machines
• Fast evolving
Program Analysis
• Many dimensions
• Compiler is an important one
• Phase 1: Single machine performance, correctness
Typical Profile
0
1
2
3
4
5
6
1 2 3 4 5 6 7 8 9 10
Function
% % execution
2/32
Open64 Tutorial, CGO 2007
(My) Background
Manual Performance Tuning
Only vague idea of how compilers work - experimental.
Work in Performance Tools
Runtime analysis/measurements - no insight into application
Work in Compiler
Strong static analysis - no runtime information
PBO (FDO) improves the situation
Many optimizations fail
(Almost) no information to the user3/32
Open64 Tutorial, CGO 2007
Approach
Combine
• Static Inter-Procedural Analysis �
• Runtime Information
Create
• Advanced Analysis Tools
• Performance Tools (Raman, CGO 2007)
• Correctness Tools (Engler, Stanford)
• High Performance Compiler
“Use the compiler as an awkward, but powerful performance analysis tool”
4/32
Open64 Tutorial, CGO 2007
Strategy
Infrastructure: Open64
• Mature, scalable, strong IR, strong research community
• LLVM is an option
Leverage external
• Work with Universities ($)
• Leverage cutting edge developments
• Push Google specific research
• Data Layout Analysis, GVL (Jianian Yan, Paul Yuan)
Leverage internal, 20%
• Dynamic memory analysis (PIN + static analysis)
• Interns (correctness tools)
5/32
Open64 Tutorial, CGO 2007
Risks
Robustness = Critical
• Small staff - can’t be eaten by bugs
• FE: gcc community
• Middle-end: Universities, Osprey, HP, Google
• x86 back-end: PathScale, Google
• Community effort (!)
• Suggestions WELCOME!
gcc vs. Open64 vs. LLVM
• Clash of civilizations…
6/32
Open64 Tutorial, CGO 2007
Future
A lot of fun !
• Exploring cutting edge developments
• Google specific optimizations
• Benchmarks soon to be released, please sign up!
• Phase 2: Tiered applications
• Wild ideas…
We are hiring !!!
7/32
Open64 Tutorial, CGO 2007
Thank You
Q/A
8/8 - just kidding