![]() |
Octopus
|
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as argument around the regions you want to profile. The module then cares about creating the profile_t objects and stores them in a hashmap so they can be retrieved using their label. More...
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as argument around the regions you want to profile. The module then cares about creating the profile_t objects and stores them in a hashmap so they can be retrieved using their label.
This module works in the following way:
Each profile_t object measures two times:
total time: time spent inside the profiling region self time: the total time minus the time spent in profiling regions called inside
To implement this there is a current pointer that holds the innermost region active. When a new profile_t is activated, it puts itself as current and stores the previous current pointer as parent. When it is deactivated it sets back current as its parent and subtracts the time spent from the parent`s self time.
This scheme will fail with recursive calls, but we dont use that and I dont think we will need it.
To be able to print the profiling results, there is an array with pointers to all initialized profile_t. For simplicity this array is static with size MAX_PROFILES, eventually it should be incremented. It could be replaced by a linked list, but I don`t think this is necessary.
Data Types | |
| type | profile_pointer_t |
| type | profile_t |
| type | profile_vars_t |
| interface | profiling_count_operations |
| interface | profiling_count_transfers |
Functions/Subroutines | |
| subroutine, public | profiling_init (namespace) |
| Create profiling subdirectory. More... | |
| subroutine, public | profiling_end (namespace) |
| subroutine | profile_init (this, label) |
| Initialize a profile object and add it to the list. More... | |
| subroutine, public | profiling_in (label, exclude) |
| Increment in counter and save entry time. More... | |
| subroutine, public | profiling_out (label) |
| Increment out counter and sum up difference between entry and exit time. More... | |
| subroutine | iprofiling_count_operations (ops) |
| subroutine | rprofiling_count_operations (ops) |
| subroutine | dprofiling_count_operations (ops) |
| subroutine | profiling_count_tran_int_l (trf, type) |
| subroutine | profiling_count_tran_int_8_l (trf, type) |
| subroutine | profiling_count_tran_real_4_l (trf, type) |
| subroutine | profiling_count_tran_real_8_l (trf, type) |
| subroutine | profiling_count_tran_complex_4_l (trf, type) |
| subroutine | profiling_count_tran_complex_8_l (trf, type) |
| subroutine | profiling_count_tran_type_l (trf, type) |
| subroutine | profiling_count_tran_int (trf, type) |
| subroutine | profiling_count_tran_int_8 (trf, type) |
| subroutine | profiling_count_tran_real_4 (trf, type) |
| subroutine | profiling_count_tran_real_8 (trf, type) |
| subroutine | profiling_count_tran_complex_4 (trf, type) |
| subroutine | profiling_count_tran_complex_8 (trf, type) |
| subroutine | profiling_count_tran_type (trf, type) |
| real(real64) function | profile_total_time (this) |
| real(real64) function | profile_self_time (this) |
| real(real64) function | profile_total_time_per_call (this) |
| real(real64) function | profile_min_time (this) |
| real(real64) function | profile_self_time_per_call (this) |
| real(real64) function | profile_total_throughput (this) |
| real(real64) function | profile_total_bandwidth (this) |
| real(real64) function | profile_self_throughput (this) |
| real(real64) function | profile_self_bandwidth (this) |
| integer function | profile_num_calls (this) |
| character(label_length) function | profile_label (this) |
| subroutine | profiling_output (namespace) |
| Write profiling results of each node to profiling.NNN/profiling.nnn The format of each line is tag-label pass_in pass_out time time/pass_in. More... | |
| subroutine | profiling_make_position_str (var, file, line, str) |
| subroutine | profiling_memory_log (type, var, file, line, size) |
| subroutine, public | profiling_memory_allocate (var, file, line, size_) |
| subroutine, public | profiling_memory_deallocate (var, file, line, size) |
| pure character(len=1) function | char_to_upper (c_in) |
| pure character(len=len(string)) function | to_upper (string) |
Variables | |
| integer, parameter | label_length = 40 |
| Max. number of characters of tag label. More... | |
| integer, parameter | max_profiles = 300 |
| Max. number of tags. More... | |
| integer, parameter, public | profiling_time = 1 |
| integer, parameter, public | profiling_memory = 2 |
| integer, parameter, public | profiling_memory_full = 4 |
| integer, parameter, public | profiling_likwid = 8 |
| integer, parameter, public | profiling_io = 16 |
| integer, parameter | max_memory_vars = 25 |
| type(profile_vars_t), target, save, public | prof_vars |
| type(sphash_t), save | profiling_map |
| subroutine, public profiling_oct_m::profiling_init | ( | type(namespace_t), intent(in) | namespace | ) |
Create profiling subdirectory.
Definition at line 263 of file profiling.F90.
| subroutine, public profiling_oct_m::profiling_end | ( | type(namespace_t), intent(in) | namespace | ) |
Definition at line 454 of file profiling.F90.
|
private |
Initialize a profile object and add it to the list.
Definition at line 534 of file profiling.F90.
| subroutine, public profiling_oct_m::profiling_in | ( | character(*), intent(in) | label, |
| logical, intent(in), optional | exclude | ||
| ) |
Increment in counter and save entry time.
| [in] | exclude | .true. The time spent here is also excluded from the parent total_time. Only use it for functions that otherwise would spoil statistics. |
Definition at line 603 of file profiling.F90.
| subroutine, public profiling_oct_m::profiling_out | ( | character(*), intent(in) | label | ) |
Increment out counter and sum up difference between entry and exit time.
Definition at line 671 of file profiling.F90.
|
private |
Definition at line 745 of file profiling.F90.
|
private |
Definition at line 757 of file profiling.F90.
|
private |
Definition at line 769 of file profiling.F90.
|
private |
Definition at line 782 of file profiling.F90.
|
private |
Definition at line 795 of file profiling.F90.
|
private |
Definition at line 808 of file profiling.F90.
|
private |
Definition at line 822 of file profiling.F90.
|
private |
Definition at line 836 of file profiling.F90.
|
private |
Definition at line 850 of file profiling.F90.
|
private |
Definition at line 864 of file profiling.F90.
|
private |
Definition at line 878 of file profiling.F90.
|
private |
Definition at line 891 of file profiling.F90.
|
private |
Definition at line 904 of file profiling.F90.
|
private |
Definition at line 918 of file profiling.F90.
|
private |
Definition at line 932 of file profiling.F90.
|
private |
Definition at line 946 of file profiling.F90.
|
private |
Definition at line 960 of file profiling.F90.
|
private |
Definition at line 972 of file profiling.F90.
|
private |
Definition at line 983 of file profiling.F90.
|
private |
Definition at line 994 of file profiling.F90.
|
private |
Definition at line 1005 of file profiling.F90.
|
private |
Definition at line 1016 of file profiling.F90.
|
private |
Definition at line 1027 of file profiling.F90.
|
private |
Definition at line 1044 of file profiling.F90.
|
private |
Definition at line 1060 of file profiling.F90.
|
private |
Definition at line 1076 of file profiling.F90.
|
private |
Definition at line 1092 of file profiling.F90.
|
private |
Definition at line 1103 of file profiling.F90.
|
private |
Write profiling results of each node to profiling.NNN/profiling.nnn The format of each line is tag-label pass_in pass_out time time/pass_in.
The last column gives the average time consumed between in and out (only, if pass_in and pass_out are equal).
Definition at line 1120 of file profiling.F90.
|
private |
Definition at line 1314 of file profiling.F90.
|
private |
Definition at line 1347 of file profiling.F90.
| subroutine, public profiling_oct_m::profiling_memory_allocate | ( | character(len=*), intent(in) | var, |
| character(len=*), intent(in) | file, | ||
| integer, intent(in) | line, | ||
| integer(int64), intent(in) | size_ | ||
| ) |
Definition at line 1371 of file profiling.F90.
| subroutine, public profiling_oct_m::profiling_memory_deallocate | ( | character(len=*), intent(in) | var, |
| character(len=*), intent(in) | file, | ||
| integer, intent(in) | line, | ||
| integer(int64), intent(in) | size | ||
| ) |
Definition at line 1442 of file profiling.F90.
|
private |
Definition at line 1464 of file profiling.F90.
|
private |
Definition at line 1480 of file profiling.F90.
|
private |
Max. number of characters of tag label.
Definition at line 153 of file profiling.F90.
|
private |
Max. number of tags.
Definition at line 153 of file profiling.F90.
| integer, parameter, public profiling_oct_m::profiling_time = 1 |
Definition at line 213 of file profiling.F90.
| integer, parameter, public profiling_oct_m::profiling_memory = 2 |
Definition at line 213 of file profiling.F90.
| integer, parameter, public profiling_oct_m::profiling_memory_full = 4 |
Definition at line 213 of file profiling.F90.
| integer, parameter, public profiling_oct_m::profiling_likwid = 8 |
Definition at line 213 of file profiling.F90.
| integer, parameter, public profiling_oct_m::profiling_io = 16 |
Definition at line 213 of file profiling.F90.
|
private |
Definition at line 220 of file profiling.F90.
| type(profile_vars_t), target, save, public profiling_oct_m::prof_vars |
Definition at line 255 of file profiling.F90.
|
private |
Definition at line 257 of file profiling.F90.