Browse Prior Art Database

Visualizing Inlined Functions in a Source Code Editor

IP.com Disclosure Number: IPCOM000216309D
Publication Date: 2012-Mar-29
Document File: 2 page(s) / 27K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method that enables developers or performance engineers to more efficiently assess the performance of automatically inlined functions. The disclosed solution allows the user to view all the inlined code in a single editor, despite the fact that the code may come from multiple source files.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 2

Visualizing Inlined Functions in a Source Code Editor

Optimizing compilers automatically inline functions in order to improve application performance. A developer or performance engineer might want to influence this process in order to improve performance even more. To make the assessment, the developer needs to know which functions were inlined and where, and might also need to know when and why a function was not inlined. With this information, the developer has a better understanding of how to make changes to their source code and/or build scripts to improve inlining and get better performance.

Compilers such as xlC are capable of producing reports in Extensible Markup Language (XML) format that describe the inlining and other optimizing transformations performed during a compile. There are existing tools that parse these XML reports and show the user the data in simple tabular formats. The xlC compiler ships with a tool that converts the XML report into Hypertext Markup Language (HTML) to view in a web browser. There is also a web tooling platform plugin that can parse the XML file and display the data in a simple table. This view just displays a list of the transformations performed, allows the user to filter the vie based on the type of optimization or the optimization phase, and allows the user to navigate to the corresponding source line.

These simple tools are very limited in nature. Inlining typically involves code from multiple source files, which makes it hard for the user to view all the code involved in a series of nested inlining transformations at the same time. The disclosed solution allows the user to view all the inlined code in a single editor, despite the fact that the code may come from multiple source files.

The idea is to create an enhanced C/C++ editor that is able to display the code for a called function or macro inline at the point at which it is called. The code may come from a different location within the current file or from a different file.

The editor initially highlights the function calls that were inlined. For example, this could be done by rendering the function calls in a specific color, by rendering the calls as hyperlinks, or, ideally, by showing small icons directly in the source code next to the function calls. This is a configurable option.

The user begins by selecting a highlighted functi...