Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

jdb_kern_info-bench.cc File Reference

#include "jdb_kern_info.h"
#include "jdb_kern_info_i.h"

Defines

#define inst_wbinvd   asm volatile ("wbinvd")
#define inst_invlpg
#define inst_read_cr3
#define inst_reload_cr3
#define inst_clts   asm volatile ("clts")
#define inst_cli_sti   asm volatile ("cli; sti")
#define inst_set_cr0_ts
#define inst_push_pop   asm volatile ("push %eax; pop %eax")
#define inst_pushf_pop   asm volatile ("pushf; pop %%eax" : : : "eax")
#define inst_in8_pic   asm volatile ("inb $0x21, %%al" : "=a" (dummy))
#define inst_in8_80   asm volatile ("inb $0x80, %%al" : "=a" (dummy))
#define inst_out8_pic   asm volatile ("outb %%al, $0x21" : : "a" (0xff))
#define inst_apic_timer_read   (volatile Unsigned32)Apic::timer_reg_read()
#define BENCH(name, instruction, rounds)

Define Documentation

#define BENCH name,
instruction,
rounds   ) 
 

Value:

do                                                                      \
    {                                                                   \
      time = Cpu::rdtsc();                                              \
      for (i=rounds; i; i--)                                            \
        instruction;                                                    \
      time = Cpu::rdtsc() - time;                                       \
      show_time (time, rounds, name);                                   \
    } while (0)

#define inst_apic_timer_read   (volatile Unsigned32)Apic::timer_reg_read()
 

#define inst_cli_sti   asm volatile ("cli; sti")
 

#define inst_clts   asm volatile ("clts")
 

#define inst_in8_80   asm volatile ("inb $0x80, %%al" : "=a" (dummy))
 

#define inst_in8_pic   asm volatile ("inb $0x21, %%al" : "=a" (dummy))
 

#define inst_invlpg
 

Value:

asm volatile ("invlpg %0"                                               \
                : : "m" (*(char*)Mem_layout::Jdb_adapter_page))

#define inst_out8_pic   asm volatile ("outb %%al, $0x21" : : "a" (0xff))
 

#define inst_push_pop   asm volatile ("push %eax; pop %eax")
 

#define inst_pushf_pop   asm volatile ("pushf; pop %%eax" : : : "eax")
 

#define inst_read_cr3
 

Value:

asm volatile ("movl %%cr3,%0"                                           \
                : "=r"(dummy))

#define inst_reload_cr3
 

Value:

asm volatile ("movl %%cr3,%0; movl %0,%%cr3"                            \
                : "=r"(dummy))

#define inst_set_cr0_ts
 

Value:

asm volatile ("movl %%cr0,%0; orl %1,%0; movl %0,%%cr0"         \
                : "=r" (dummy) : "i" (CR0_TS))

#define inst_wbinvd   asm volatile ("wbinvd")
 


Generated on Mon Sep 26 14:20:13 2005 for Fiasco by  doxygen 1.4.2