SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
|
Support for code profiling. More...
Go to the source code of this file.
Data Structures | |
struct | profiler_region |
The layout of the profiler's DSG region. More... | |
struct | profiler_state |
The internal state of the profiler. More... | |
Macros | |
#define | PROFILER_N_HEADER_WORDS 1 |
Number of words in profile region not filled with actual profile data. | |
Enumerations | |
enum | profiler_event { PROFILER_ENTER = 1 << 31 , PROFILER_EXIT = 0 } |
Types of profiler event. More... | |
Functions | |
void | profiler_init (uint32_t *data_region) |
Initialise the profiler from a SDRAM region. | |
void | profiler_finalise (void) |
Finalises profiling. | |
static void | profiler_write_entry (uint32_t tag) |
Write a profiler entry. | |
static void | profiler_write_entry_disable_irq_fiq (uint32_t tag) |
Write an entry with all interrupts disabled. | |
static void | profiler_write_entry_disable_fiq (uint32_t tag) |
Write an entry with just fast interrupts disabled. | |
Variables | |
struct profiler_state | profiler_state |
The concrete profiler state. | |
Support for code profiling.
The profiler is known to have an impact on performance, and requires the use of the secondary system timer for this core.
Definition in file profiler.h.
struct profiler_region |
The layout of the profiler's DSG region.
Definition at line 47 of file profiler.h.
Data Fields | ||
---|---|---|
uint32_t | count | The number of samples taken. |
uint32_t | samples[] |
The samples. Each sample is the timestamp (taken from a free-running timer) at the point a sample was taken, and a tag identifying what the sample point was. (Two words. Not formed into a structure for historical reasons.) |
struct profiler_state |
The internal state of the profiler.
Definition at line 59 of file profiler.h.
Data Fields | ||
---|---|---|
uint32_t * | count | Points to where the profiling data starts being stored. |
uint32_t | samples_remaining | How many samples can be written before space is exhausted. |
uint32_t * | output | Points to where the next sample will be written. |
#define PROFILER_N_HEADER_WORDS 1 |
Number of words in profile region not filled with actual profile data.
Definition at line 28 of file profiler.h.
Types of profiler event.
Definition at line 78 of file profiler.h.
Initialise the profiler from a SDRAM region.
data_region | The pointer to the region, which must be laid out according to the profiler_region structure. |
Definition at line 34 of file profiler.c.
Finalises profiling.
This includes the potentially slow process of writing to profiler_region::count
Definition at line 51 of file profiler.c.
Write a profiler entry.
[in] | tag | Value that identifies the location being profiled. |
Requires two words of profiler storage to record an entry, one for the high-resolution timestamp and one for the tag.
Definition at line 99 of file profiler.h.
Write an entry with all interrupts disabled.
[in] | tag | Value that identifies the location being profiled. |
Definition at line 111 of file profiler.h.
Write an entry with just fast interrupts disabled.
[in] | tag | Value that identifies the location being profiled. |
Definition at line 122 of file profiler.h.
|
extern |
The concrete profiler state.
Definition at line 29 of file profiler.c.