Mentor Graphics uses Breeze in action to optimise a software build

Tracing a makefileEvery so often we like to post real examples of our tools in action.

Here Ahmed Ismail, software engineer at Mentor Graphics, a multinational software company, reports back on how he optimised his software build using Breeze:

Ellexus’ Breeze has a simple use model and UI interface. It gives good information on traces and is useful to debug specific parts of a run. It can be used to easily walk through a script by understanding IO operations over time.

I first used Breeze to trace an incremental software build with a <30 seconds run. Once the trace file was generated, I started the UI and imported the trace. I started to get some really useful information; I found that hundreds of shell calls were being made within the incremental build.

I started to expand the shell commands in Breeze one by one to get more details. Breeze showed me the commandline arguments and I found they were all doing the same thing:

cd some_location; pwd

I went back to the makefiles and found some shell calls like this:

MODELTECH_DIR = $(shell cd $(MTI_ROOT); pwd)/modeltech

After a bit of research I discovered that it is very bad practice to use recursive assignment with shell commands in makefiles (see article on makefile performance from Electric Cloud).

I just needed to do the below change in a few places:

MODELTECH_DIR := $(shell cd $(MTI_ROOT); pwd)/modeltech

“After rerunning I observed about 87% improvement in incremental build (16 sec to 2 sec)!

“Overall Breeze gives good detailed information about a short trace that can be used to improve runtime when you look at specific parts of the run.”

It is also good for gaining more information about our programs and scripts. Breeze can easily be used to walkthrough a script by understanding the IO operations over time.