Pinpointing Software Inefficiencies With Profiling

Complex codebases with several layers of abstractions have abundant inefficiencies that affect the performance. These inefficiencies arise due to various causes such as developers' inattention to performance, inappropriate choice of algorithms and inefficient code generation among others. To el...

Full description

Bibliographic Details
Main Author: Wen, Shasha
Format: Others
Language:English
Published: W&M ScholarWorks 2020
Subjects:
Online Access:https://scholarworks.wm.edu/etd/1593091771
https://scholarworks.wm.edu/cgi/viewcontent.cgi?article=6880&context=etd
id ndltd-wm.edu-oai-scholarworks.wm.edu-etd-6880
record_format oai_dc
spelling ndltd-wm.edu-oai-scholarworks.wm.edu-etd-68802021-09-18T05:31:52Z Pinpointing Software Inefficiencies With Profiling Wen, Shasha Complex codebases with several layers of abstractions have abundant inefficiencies that affect the performance. These inefficiencies arise due to various causes such as developers' inattention to performance, inappropriate choice of algorithms and inefficient code generation among others. To eliminate the redundancies, lots of work has been done during the compiling phase. However, not all redundancies can be easily detected or eliminated with compiler optimization passes due to aliasing, limited optimization scopes, and insensitivity to input and execution contexts act as severe deterrents to static program analysis. There are also profiling tools which can reveal how resources are used. However, they can hard to distinguish whether the resource is worth fully used. More profiling tools are in needed to diagnose resource wastage and pinpoint inefficiencies. We have developed three tools to pinpoint different types of inefficiencies in different granularity. We build Runtime Value Numbering (RVN), a dynamic fine-grained profiler to pinpoint and quantify redundant computations in an execution. It is based on the classical value numbering technique but works at runtime instead of compile-time. We developed RedSpy, a fine-grained profiler to pinpoint and quantify value redundancies in program executions. Value redundancy may happen overtime at the same locations or in adjacent locations, and thus it has temporal and spatial locality. RedSpy identifies both temporal and spatial value locality. Furthermore, RedSpy is capable of identifying values that are approximately the same, enabling optimization opportunities in HPC codes that often use floating-point computations. RVN and RedSpy are both instrumentation based tools. They provide comprehensive result while introducing high space and time overhead. Our lightweight framework, Witch, samples consecutive accesses to the same memory location by exploiting two ubiquitous hardware features: the performance monitoring units (PMU) and debug registers. Witch performs no instrumentation. Hence, witchcraft - tools built atop Witch - can detect a variety of software inefficiencies while introducing negligible slowdown and insignificant memory consumption and yet maintaining accuracy comparable to exhaustive instrumentation tools. Witch allowed us to scale our analysis to a large number of codebases. All the tools work on fully optimized binary executable and provide insightful optimization guidance by apportioning redundancies to their provenance - source lines and full calling contexts. We apply RVN, RedSpy, and Witch on programs that were optimization targets for decades and guided by the tools, we were able to eliminate redundancies that resulted in significant speedups. 2020-01-01T08:00:00Z text application/pdf https://scholarworks.wm.edu/etd/1593091771 https://scholarworks.wm.edu/cgi/viewcontent.cgi?article=6880&context=etd © The Author http://creativecommons.org/licenses/by/4.0/ Dissertations, Theses, and Masters Projects English W&M ScholarWorks Computer Sciences
collection NDLTD
language English
format Others
sources NDLTD
topic Computer Sciences
spellingShingle Computer Sciences
Wen, Shasha
Pinpointing Software Inefficiencies With Profiling
description Complex codebases with several layers of abstractions have abundant inefficiencies that affect the performance. These inefficiencies arise due to various causes such as developers' inattention to performance, inappropriate choice of algorithms and inefficient code generation among others. To eliminate the redundancies, lots of work has been done during the compiling phase. However, not all redundancies can be easily detected or eliminated with compiler optimization passes due to aliasing, limited optimization scopes, and insensitivity to input and execution contexts act as severe deterrents to static program analysis. There are also profiling tools which can reveal how resources are used. However, they can hard to distinguish whether the resource is worth fully used. More profiling tools are in needed to diagnose resource wastage and pinpoint inefficiencies. We have developed three tools to pinpoint different types of inefficiencies in different granularity. We build Runtime Value Numbering (RVN), a dynamic fine-grained profiler to pinpoint and quantify redundant computations in an execution. It is based on the classical value numbering technique but works at runtime instead of compile-time. We developed RedSpy, a fine-grained profiler to pinpoint and quantify value redundancies in program executions. Value redundancy may happen overtime at the same locations or in adjacent locations, and thus it has temporal and spatial locality. RedSpy identifies both temporal and spatial value locality. Furthermore, RedSpy is capable of identifying values that are approximately the same, enabling optimization opportunities in HPC codes that often use floating-point computations. RVN and RedSpy are both instrumentation based tools. They provide comprehensive result while introducing high space and time overhead. Our lightweight framework, Witch, samples consecutive accesses to the same memory location by exploiting two ubiquitous hardware features: the performance monitoring units (PMU) and debug registers. Witch performs no instrumentation. Hence, witchcraft - tools built atop Witch - can detect a variety of software inefficiencies while introducing negligible slowdown and insignificant memory consumption and yet maintaining accuracy comparable to exhaustive instrumentation tools. Witch allowed us to scale our analysis to a large number of codebases. All the tools work on fully optimized binary executable and provide insightful optimization guidance by apportioning redundancies to their provenance - source lines and full calling contexts. We apply RVN, RedSpy, and Witch on programs that were optimization targets for decades and guided by the tools, we were able to eliminate redundancies that resulted in significant speedups.
author Wen, Shasha
author_facet Wen, Shasha
author_sort Wen, Shasha
title Pinpointing Software Inefficiencies With Profiling
title_short Pinpointing Software Inefficiencies With Profiling
title_full Pinpointing Software Inefficiencies With Profiling
title_fullStr Pinpointing Software Inefficiencies With Profiling
title_full_unstemmed Pinpointing Software Inefficiencies With Profiling
title_sort pinpointing software inefficiencies with profiling
publisher W&M ScholarWorks
publishDate 2020
url https://scholarworks.wm.edu/etd/1593091771
https://scholarworks.wm.edu/cgi/viewcontent.cgi?article=6880&context=etd
work_keys_str_mv AT wenshasha pinpointingsoftwareinefficiencieswithprofiling
_version_ 1719482649739788288