add counter for mail_ping latency

This commit is contained in:
Simon Pickartz 2011-06-06 23:29:00 -07:00
parent 841e404a21
commit 413af27f9b

View file

@ -238,16 +238,22 @@ int icc_mail_ping( void )
kprintf( "#### Hello from icc_mail_ping\n" );
// iRCCE is not thread save => disable interrupts
flags = irq_nested_disable();
// start timer
uint64_t timer = rdtsc();
// send mail
iRCCE_mail_send( 0, my_ue, 0, NULL, remote_rank );
kprintf( "### Message sent ...\n" );
// wait for mail from remote rank
iRCCE_MAIL_HEADER* mail;
do {
iRCCE_mail_recv( &mail );
} while( !mail );
timer = timer - rdtsc();
kprintf( "Received mail in %d ticks!\n", timer );
// show content
iRCCE_mailbox_print_header( mail );