Browse Source

[pxe] Profile UNDI transmit datapath

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
90caf71051
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/arch/i386/interface/pxe/pxe_undi.c

+ 8
- 0
src/arch/i386/interface/pxe/pxe_undi.c View File

38
 #include <ipxe/ip.h>
38
 #include <ipxe/ip.h>
39
 #include <ipxe/arp.h>
39
 #include <ipxe/arp.h>
40
 #include <ipxe/rarp.h>
40
 #include <ipxe/rarp.h>
41
+#include <ipxe/profile.h>
41
 #include "pxe.h"
42
 #include "pxe.h"
42
 
43
 
43
 /**
44
 /**
53
 
54
 
54
 struct net_device *pxe_netdev = NULL;
55
 struct net_device *pxe_netdev = NULL;
55
 
56
 
57
+/** Transmit profiler */
58
+static struct profiler undi_tx_profiler __profiler = { .name = "undi.tx" };
59
+
56
 /**
60
 /**
57
  * Set network device as current PXE network device
61
  * Set network device as current PXE network device
58
  *
62
  *
309
 	unsigned int i;
313
 	unsigned int i;
310
 	int rc;
314
 	int rc;
311
 
315
 
316
+	/* Start profiling */
317
+	profile_start ( &undi_tx_profiler );
318
+
312
 	/* Sanity check */
319
 	/* Sanity check */
313
 	if ( ! pxe_netdev ) {
320
 	if ( ! pxe_netdev ) {
314
 		DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
321
 		DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
422
 		return PXENV_EXIT_FAILURE;
429
 		return PXENV_EXIT_FAILURE;
423
 	}
430
 	}
424
 
431
 
432
+	profile_stop ( &undi_tx_profiler );
425
 	undi_transmit->Status = PXENV_STATUS_SUCCESS;
433
 	undi_transmit->Status = PXENV_STATUS_SUCCESS;
426
 	return PXENV_EXIT_SUCCESS;
434
 	return PXENV_EXIT_SUCCESS;
427
 }
435
 }

Loading…
Cancel
Save