iPXE
profile.h
Go to the documentation of this file.
1#ifndef _BITS_PROFILE_H
2#define _BITS_PROFILE_H
3
4/** @file
5 *
6 * Profiling
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12#include <stdint.h>
13
14/**
15 * Get profiling timestamp
16 *
17 * @ret timestamp Timestamp
18 */
19static inline __attribute__ (( always_inline )) unsigned long
20profile_timestamp ( void ) {
21 uint32_t tsc;
22
23 /* Read timestamp counter */
24 __asm__ __volatile__ ( "rdtsc" : "=a" ( tsc ) : : "edx" );
25 return tsc;
26}
27
28#endif /* _BITS_PROFILE_H */
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
unsigned int uint32_t
Definition stdint.h:12
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __attribute__(x)
Definition compiler.h:10
unsigned long profile_timestamp(void)
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")