Nintendo 3DS CPU Profiler  4.05
 All Functions Enumerations Enumerator Groups Pages
Nintendo 3DS CPU Profiler Runtime API

Introduction

By default, the profiler does not need any interaction from the game being profiled. However, there are some important features which require the game to make calls into the profiler. By making use of the API the following features become available:

Installing the API

To install the profiler game API, copy the contents of the sdk-X_X_X folder into your current SDK directory so that they can be referenced during compilation of your game.

Integrating the API

To access the API from the game, the API header file must be included in the application and the API library must be added to the game project. To add the library, add profiler.<build type>.a to the list of included libraries in the game's OMakefile, where <build type> is either fast or small. For more information on the API, please check the API Reference.

#include <nn/prof.h>

While the profiler will work without any explicit use of the API, we strongly recommend that you place Frame Marking in your game. A minimalist demo is provided that shows the minimal recommended API integration procedure.

Disabling the API

To make it easier to enable and disable the API in an application, all calls to profiler functions can be removed by defining NN_PROF_DO_NOT_USE in the application before the API header file is included.

#define NN_PROF_DO_NOT_USE
#include <nn/prof.h>

Alternatively, it is also possible to pass NN_PROF_DO_NOT_USE on the compiler command line as pre-processor directive.

-DNN_PROF_DO_NOT_USE