Perf_get_total_time(), Perf_get_section_time(), Perf_get_total_time() -9 – Altera Embedded Peripherals IP User Manual
Page 309: Perf_get_section_time() -9

Parameters:
perf_base
—Performance counter core base address.
clock_freq_hertz
—Clock frequency.
num_sections
—The number of section counters to display. This must not
exceed
section_name_1 ... section_name_n
—The section names to display. The
number of section names varies depending on the number of sections to display.
Returns:
0
Description:
Function
perf_print_formatted_report()
reads the profiling results from the
performance counter core, and prints a formatted summary table.
This function disables all counters. However, for predictable results in a multi-
threaded or interrupt environment, invoke
PERF_STOP_MEASURING()
when you
reach the end of the code to be measured, rather than relying on
perf_print_
formatted_report()
.
perf_get_total_time()
Prototype:
alt_u64 perf_get_total_time(void* hw_base_address)
Thread-safe:
No.
Available
from ISR:
Yes.
Include:
Parameters:
hw_base_address
—base address of performance counter core.
Returns:
Aggregate global time in clock cycles.
Description:
Function
perf_get_total_time()
reads the raw global time. This is the
aggregate time, in clock cycles, that the performance counter core has been
enabled. This function has the side effect of stopping the counters.
perf_get_section_time()
Prototype:
alt_u64 perf_get_section_time
(void* hw_base_address, int which_section)
Thread-safe:
No.
Available from
ISR:
Yes.
Include:
Parameters:
hw_base_address
—performance counter core base address.
which_section
—counter section number.
Returns:
Aggregate section time in clock cycles.
UG-01085
2014.24.07
perf_get_total_time()
31-9
Performance Counter Core
Altera Corporation