iPXE
Functions
profile.h File Reference

Profiling. More...

#include <stdint.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __attribute__ ((always_inline)) uint64_t profile_timestamp(void)
 Get profiling timestamp. More...
 

Detailed Description

Profiling.

Definition in file profile.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Get profiling timestamp.

Return values
timestampTimestamp

Definition at line 19 of file profile.h.

20  {
21  uint64_t tsc;
22 
23  /* Read timestamp counter */
24  __asm__ __volatile__ ( "rdtsc" : "=A" ( tsc ) );
25  return tsc;
26 }
unsigned long long uint64_t
Definition: stdint.h:13
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
__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")

References __asm__(), and __volatile__().