iPXE
|
Profiling. More...
Go to the source code of this file.
Data Structures | |
struct | profiler |
A data structure for storing profiling information. More... | |
Macros | |
#define | PROFILING 1 |
#define | PROFILERS __table ( struct profiler, "profilers" ) |
Profiler table. More... | |
#define | __profiler __table_entry ( PROFILERS, 01 ) |
Declare a profiler. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
unsigned long | profile_timestamp (void) |
void | profile_update (struct profiler *profiler, unsigned long sample) |
Update profiler with a new sample. More... | |
unsigned long | profile_mean (struct profiler *profiler) |
Get mean sample value. More... | |
unsigned long | profile_variance (struct profiler *profiler) |
Get sample variance. More... | |
unsigned long | profile_stddev (struct profiler *profiler) |
Get sample standard deviation. More... | |
static unsigned long | profile_started (struct profiler *profiler) |
Get start time. More... | |
static unsigned long | profile_stopped (struct profiler *profiler) |
Get stop time. More... | |
static unsigned long | profile_elapsed (struct profiler *profiler) |
Get elapsed time. More... | |
static void | profile_start_at (struct profiler *profiler, unsigned long started) |
Start profiling. More... | |
static void | profile_stop_at (struct profiler *profiler, unsigned long stopped) |
Stop profiling. More... | |
static void | profile_start (struct profiler *profiler) |
Start profiling. More... | |
static void | profile_stop (struct profiler *profiler) |
Stop profiling. More... | |
static void | profile_exclude (struct profiler *profiler) |
Exclude time from other ongoing profiling results. More... | |
static void | profile_custom (struct profiler *profiler, unsigned long sample) |
Record profiling sample in custom units. More... | |
Variables | |
unsigned long | profile_excluded |
Accumulated time excluded from profiling. More... | |
Profiling.
Definition in file profile.h.
static struct undinet_profiler undinet_misc_profiler __profiler __table_entry ( PROFILERS, 01 ) |
Declare a profiler.
PXENV_UNDI_ISR profiler.
PXENV_UNDI_TRANSMIT profiler.
Virtual call profiler.
Real-mode call profiler.
Real-to-protected mode transition profiler.
Other interrupt profiler.
Miscellaneous PXE API call profiler.
PXE unknown API call profiler.
PXENV_UNDI_ISR API call profiler.
Transfer event profiler.
Event ring profiler.
Stream transfer profiler.
VM event profiler.
VM transmit profiler.
Bulk IN per-datagram profiler.
VM poll profiler.
VM receive refill profiler.
Bulk OUT profiler.
Bulk IN completion profiler.
Server profiler.
Data transfer profiler.
PeerDist block download discovery timeout profiler.
PeerDist block download discovery success profiler.
PeerDist block download attempt timeout profiler.
PeerDist block download attempt failure profiler.
PeerDist block download attempt success profiler.
Network transmit profiler.
Network receive profiler.
Receive profiler.
Post receive work queue entry profiler.
Data read profiler.
Data write profiler.
This profiler can be used to measure the overhead of a dummy PXE API call.
Note that this profiler will not see calls to PXENV_UNDI_ISR_IN_START, which are handled by the UNDI ISR and do not go via undinet_call().
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
unsigned long profile_timestamp | ( | void | ) |
Referenced by efi_entropy_tick(), efi_stack_cookie(), profile_start(), and profile_stop().
void profile_update | ( | struct profiler * | profiler, |
unsigned long | sample | ||
) |
Update profiler with a new sample.
profiler | Profiler |
sample | Sample value |
Definition at line 110 of file profile.c.
References profiler::accvar, profiler::accvar_msb, assert(), profiler::count, DBGC, flsl, flsll, INT_MAX, profiler::mean, profiler::mean_msb, profile_accvar_shift(), profile_hex_fraction(), and profile_mean_shift().
Referenced by profile_custom(), profile_okx(), and profile_stop_at().
unsigned long profile_mean | ( | struct profiler * | profiler | ) |
Get mean sample value.
profiler | Profiler |
mean | Mean sample value |
Definition at line 241 of file profile.c.
References profiler::mean, and profile_mean_shift().
Referenced by cipher_cost(), digest_cost(), memcpy_test_speed(), profile_okx(), profstat(), and tcpip_random_okx().
unsigned long profile_variance | ( | struct profiler * | profiler | ) |
Get sample variance.
profiler | Profiler |
variance | Sample variance |
Definition at line 255 of file profile.c.
References profiler::accvar, profiler::count, and profile_accvar_shift().
Referenced by profile_stddev().
unsigned long profile_stddev | ( | struct profiler * | profiler | ) |
Get sample standard deviation.
profiler | Profiler |
stddev | Sample standard deviation |
Definition at line 275 of file profile.c.
References isqrt(), and profile_variance().
Referenced by memcpy_test_speed(), profile_okx(), profstat(), and tcpip_random_okx().
|
inlinestatic |
Get start time.
profiler | Profiler |
started | Start time |
Definition at line 79 of file profile.h.
References profile_excluded, PROFILING, and profiler::started.
Referenced by profile_elapsed(), and undinet_call().
|
inlinestatic |
Get stop time.
profiler | Profiler |
stopped | Stop time |
Definition at line 96 of file profile.h.
References profile_excluded, PROFILING, and profiler::stopped.
Referenced by profile_elapsed(), and undinet_call().
|
inlinestatic |
Get elapsed time.
profiler | Profiler |
elapsed | Elapsed time |
Definition at line 113 of file profile.h.
References profile_started(), profile_stopped(), and PROFILING.
Referenced by profile_exclude(), and profile_stop_at().
|
inlinestatic |
Start profiling.
profiler | Profiler |
started | Start timestamp |
Definition at line 131 of file profile.h.
References profile_excluded, PROFILING, profiler::started, and started.
Referenced by librm_test_exec(), profile_start(), and undinet_call().
|
inlinestatic |
Stop profiling.
profiler | Profiler |
stopped | Stop timestamp |
Definition at line 145 of file profile.h.
References profile_elapsed(), profile_excluded, profile_update(), PROFILING, and profiler::stopped.
Referenced by librm_test_exec(), profile_stop(), and undinet_call().
|
inlinestatic |
Start profiling.
profiler | Profiler |
Definition at line 160 of file profile.h.
References profile_start_at(), profile_timestamp(), and PROFILING.
Referenced by acm_in_complete(), acm_intr_complete(), acm_out_transmit(), axge_in_complete(), axge_intr_complete(), axge_out_transmit(), bigint_reduce_raw(), cipher_cost(), digest_cost(), ecm_in_complete(), ecm_intr_complete(), ecm_out_transmit(), http_conn_deliver(), http_content_deliver(), ib_post_recv(), ib_post_send(), intel_poll(), intel_refill_rx(), intel_transmit(), interrupt(), iphone_in_complete(), iphone_out_transmit(), ipv4_rx(), ipv4_tx(), librm_test_exec(), memcpy_test_speed(), ncm_in_complete(), ncm_intr_complete(), ncm_out_transmit(), net_poll(), netdev_tx(), pxe_api_call(), pxenv_undi_transmit(), smsc75xx_in_complete(), smsc75xx_out_transmit(), smsc95xx_in_complete(), smsc95xx_out_transmit(), smscusb_intr_complete(), tcp_rx(), tcp_rx_data(), tcp_xmit_sack(), tcpip_random_okx(), tftp_rx(), tftp_rx_data(), undinet_call(), undinet_poll(), vmxnet3_command(), vmxnet3_poll_events(), vmxnet3_refill_rx(), vmxnet3_transmit(), xferbuf_deliver(), xferbuf_read(), xferbuf_write(), xhci_endpoint_message(), xhci_endpoint_stream(), xhci_event_poll(), and xhci_transfer().
|
inlinestatic |
Stop profiling.
profiler | Profiler |
Definition at line 173 of file profile.h.
References profile_stop_at(), profile_timestamp(), and PROFILING.
Referenced by acm_in_complete(), acm_intr_complete(), acm_out_transmit(), axge_in_complete(), axge_intr_complete(), axge_out_transmit(), bigint_reduce_raw(), cipher_cost(), digest_cost(), ecm_in_complete(), ecm_intr_complete(), ecm_out_transmit(), http_conn_deliver(), http_content_deliver(), ib_post_recv(), ib_post_send(), intel_poll(), intel_refill_rx(), intel_transmit(), interrupt(), iphone_in_complete(), iphone_out_transmit(), ipv4_rx(), ipv4_tx(), librm_test_exec(), memcpy_test_speed(), ncm_in_complete(), ncm_intr_complete(), ncm_out_transmit(), net_poll(), netdev_tx(), pxe_api_call(), pxenv_undi_transmit(), smsc75xx_in_complete(), smsc75xx_out_transmit(), smsc95xx_in_complete(), smsc95xx_out_transmit(), smscusb_intr_complete(), tcp_rx(), tcp_rx_data(), tcp_xmit_sack(), tcpip_random_okx(), tftp_rx_data(), undinet_call(), undinet_poll(), vmxnet3_command(), vmxnet3_poll_events(), vmxnet3_refill_rx(), vmxnet3_transmit(), xferbuf_deliver(), xferbuf_read(), xferbuf_write(), xhci_endpoint_message(), xhci_endpoint_stream(), xhci_event_poll(), and xhci_transfer().
|
inlinestatic |
Exclude time from other ongoing profiling results.
profiler | Profiler |
Definition at line 186 of file profile.h.
References profile_elapsed(), profile_excluded, and PROFILING.
Referenced by intel_poll(), intel_refill_rx(), intel_transmit(), interrupt(), vmxnet3_command(), vmxnet3_poll_events(), vmxnet3_refill_rx(), and vmxnet3_transmit().
|
inlinestatic |
Record profiling sample in custom units.
profiler | Profiler |
sample | Profiling sample |
Definition at line 200 of file profile.h.
References profile_update(), and PROFILING.
Referenced by peerblk_close(), peerblk_discovered(), peerblk_done(), and peerblk_expired().
unsigned long profile_excluded |
Accumulated time excluded from profiling.
Definition at line 49 of file profile.c.
Referenced by profile_exclude(), profile_start_at(), profile_started(), profile_stop_at(), and profile_stopped().