From 413af27f9bb0695217ba9ad4e27b42bd12982a37 Mon Sep 17 00:00:00 2001 From: Simon Pickartz Date: Mon, 6 Jun 2011 23:29:00 -0700 Subject: [PATCH] add counter for mail_ping latency --- arch/x86/scc/icc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/scc/icc.c b/arch/x86/scc/icc.c index 96ea623d..bf12483d 100644 --- a/arch/x86/scc/icc.c +++ b/arch/x86/scc/icc.c @@ -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 );