We are developing an integrated environment for application tuning that combines robust, existing, open source software - the OpenUH compiler and performance tools. The goal of this effort is to increase user productivity by providing an automated, scalable performance measurement and optimization system. The software and interfaces that we have created has enabled us to accomplish a scalable strategy for performance analysis, which is essential if performance tuning tools are to address the needs of emerging very large scale systems. We have discovered that one of the benefits of using compiler technology in this context is that it can direct the performance tools to decide which regions of code they should measure, selectively considering both coarse grain and fine grain regions (control flow level) of the code. Using a cost model embedded in the compiler's interprocedural analyzer, we can statically assess the importance of a region via an estimated cost vector that takes its size and the frequency with which it is invoked into account. This approach enables us to set different thresholds that determine whether or not a given region should be instrumented. Our strategy has been shown to significantly reduce overheads for both profiling and tracing to acceptable levels. In this paper, we show how the compiler helps identify performance problems by illustrating its use with the NAS parallel benchmarks and a cloud resolving model code.