NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ab::AdmissionService Class Reference
Inheritance diagram for ab::AdmissionService:
CapAllocatorAtomicPartition< 1<< CONST_CAP_RANGE > ProgramConsole NovaProgram CapAllocatorAtomic< BITS > BaseProgram CapAllocator InternalCapAllocator

Classes

struct  ClientData
struct  MemoryClientData

Public Types

enum  { VALUEWIDTH = 2U, WIDTH = 80U, HEIGHT = 25U, REFILL_PRIO = 255U }

Public Member Functions

 AdmissionService ()
void init_service (Hip *hip)
unsigned alloc_cap (unsigned num=1, unsigned cpu=~0U)
void dealloc_cap (unsigned cap, unsigned count=1)
unsigned alloc_crd ()
void get_idle (Hip *hip, unsigned num_cpu_shift)
unsigned measure (ClientData volatile *data, phy_cpu_no pcpu)
void top_dump_prio (Hip *hip, unsigned num_cpu_shift)
void measure_scs (Hip *hip)
void top_dump_scs (Utcb &utcb, Hip *hip, unsigned &client_num, unsigned num_cpu_shift)
void sort (timevalue *ptr, unsigned *pos, unsigned n)
void top_dump_thread (ClientData volatile *data, unsigned num_sc)
void top_dump_client (unsigned client_num, unsigned interval, Hip *hip, unsigned num_sc)
void splitfloat (timevalue &val, timevalue &rest, phy_cpu_no pcpu)
void check_clients (Utcb &utcb)
unsigned portal_func (Utcb &utcb, Utcb::Frame &input, bool &free_cap, cap_sel pid)
unsigned get_usage (ClientData *data, timevalue &time_con, const char *name, bool fresh)
unsigned get_usage (Utcb &utcb, ClientData volatile *data)
bool start_service (Utcb *utcb, Hip *hip)
bool run_statistics (Utcb *utcb, Hip *hip)
NORETURN void run (Utcb *utcb, Hip *hip)
- Public Member Functions inherited from CapAllocatorAtomicPartition< 1<< CONST_CAP_RANGE >
 CapAllocatorAtomicPartition (cap_sel _cap_start=~0UL, unsigned divider=1)
- Public Member Functions inherited from CapAllocatorAtomic< BITS >
 CapAllocatorAtomic (cap_sel _cap_start=~0UL)
unsigned idx_max () const
unsigned bytes_max () const
cap_sel idx_smallest ()
cap_sel alloc_cap (unsigned count=1)
- Public Member Functions inherited from NovaProgram
 NovaProgram ()
- Public Member Functions inherited from CapAllocator
 CapAllocator (unsigned long cap_, unsigned long cap_start, unsigned long cap_order)
unsigned alloc_cap (unsigned count=1)

Static Public Member Functions

static void _putc (void *data, int value)
- Static Public Member Functions inherited from NovaProgram
static void exit (const char *msg)
 Default exit function.
- Static Public Member Functions inherited from BaseProgram
static Utcbmyutcb (unsigned long esp=0)
 Get the UTCB pointer from the top of the stack, which is laid out as follows:
static phy_cpu_no mycpu ()
 Return my CPU number.
static void revoke_all_mem (void *address, unsigned long size, unsigned rights, bool myself)
 Revoke all memory for a given virtual region.
static Crd request_mapping (char *start, unsigned long size, unsigned long hotspot)
 Request the mapping for a memory area.

Static Public Attributes

static unsigned cursor_pos

Private Member Functions

 ALIGNED (8) ClientDataStorage< ClientData

Private Attributes

ab::AdmissionService::ClientData PACKED
struct
ab::AdmissionService::MemoryClientData 
PACKED
struct ClientData idle_scs
struct ClientData own_scs
timevalue global_sum [Config::MAX_CPUS]
timevalue global_prio [Config::MAX_CPUS][256]
AdmissionService _storage
bool enable_top
bool enable_measure
bool enable_log
bool enable_verbose
unsigned cpu_start
unsigned cpu_end
unsigned interval

Static Private Attributes

static char * flag_revoke

Additional Inherited Members

- Public Attributes inherited from CapAllocator
unsigned long _cap_
unsigned long _cap_start
unsigned long _cap_order
- Protected Types inherited from CapAllocatorAtomic< BITS >
enum  { BITS_PER_CHAR = 8, BITS_PER_UNSIGNED = sizeof(unsigned)*8, BYTES_PER_UNSIGNED = sizeof(unsigned) }
- Protected Member Functions inherited from CapAllocatorAtomic< BITS >
cap_sel internal_alloc_cap (unsigned count=1, unsigned byte_start=0)
- Protected Member Functions inherited from ProgramConsole
void console_init (const char *name, Semaphore *sem)
- Protected Member Functions inherited from NovaProgram
Utcballoc_utcb ()
 Alloc a region of virtual memory to put an EC into.
template<class C >
 __attribute__ ((nonnull(6))) unsigned create_ec_helper(C *tls
 Create an EC and setup the stack.
void init_mem (Hip *hip)
 Init the memory map from the HIP as we get them from sigma0.
void __attribute__ ((noreturn)) block_forever()
 Block ourself.
- Static Protected Member Functions inherited from ProgramConsole
static void putc (void *data, int value)
- Protected Attributes inherited from CapAllocatorAtomicPartition< 1<< CONST_CAP_RANGE >
unsigned _divider
- Protected Attributes inherited from ProgramConsole
VgaRegs _vga_regs
struct console_data _console_data
char _vga_console [0x1000]
- Protected Attributes inherited from NovaProgram
Hip_hip
unsigned _cap_block
RegionList< 512 > _free_virt
RegionList< 512 > _free_phys
RegionList< 512 > _virt_phys
phy_cpu_no cpunr
phy_cpu_no unsigned excbase
phy_cpu_no unsigned Utcb ** utcb_out
phy_cpu_no unsigned Utcb void * func
phy_cpu_no unsigned Utcb void
unsigned long 
cap = ~0UL
phy_cpu_no unsigned Utcb void
unsigned long bool 
local

Member Enumeration Documentation

anonymous enum
Enumerator:
VALUEWIDTH 
WIDTH 
HEIGHT 
REFILL_PRIO 

Constructor & Destructor Documentation

ab::AdmissionService::AdmissionService ( )
inline

Member Function Documentation

static void ab::AdmissionService::_putc ( void *  data,
int  value 
)
inlinestatic
ab::AdmissionService::ALIGNED ( )
private
unsigned ab::AdmissionService::alloc_cap ( unsigned  num = 1,
unsigned  cpu = ~0U 
)
inline
unsigned ab::AdmissionService::alloc_crd ( )
inline
void ab::AdmissionService::check_clients ( Utcb utcb)
inline
void ab::AdmissionService::dealloc_cap ( unsigned  cap,
unsigned  count = 1 
)
inline

Reimplemented from CapAllocatorAtomic< BITS >.

void ab::AdmissionService::get_idle ( Hip hip,
unsigned  num_cpu_shift 
)
inline
unsigned ab::AdmissionService::get_usage ( ClientData data,
timevalue time_con,
const char *  name,
bool  fresh 
)
inline
unsigned ab::AdmissionService::get_usage ( Utcb utcb,
ClientData volatile *  data 
)
inline
void ab::AdmissionService::init_service ( Hip hip)
inline
unsigned ab::AdmissionService::measure ( ClientData volatile *  data,
phy_cpu_no  pcpu 
)
inline
void ab::AdmissionService::measure_scs ( Hip hip)
inline
unsigned ab::AdmissionService::portal_func ( Utcb utcb,
Utcb::Frame input,
bool &  free_cap,
cap_sel  pid 
)
inline
NORETURN void ab::AdmissionService::run ( Utcb utcb,
Hip hip 
)
inline
bool ab::AdmissionService::run_statistics ( Utcb utcb,
Hip hip 
)
inline
void ab::AdmissionService::sort ( timevalue ptr,
unsigned *  pos,
unsigned  n 
)
inline
void ab::AdmissionService::splitfloat ( timevalue val,
timevalue rest,
phy_cpu_no  pcpu 
)
inline
bool ab::AdmissionService::start_service ( Utcb utcb,
Hip hip 
)
inline
void ab::AdmissionService::top_dump_client ( unsigned  client_num,
unsigned  interval,
Hip hip,
unsigned  num_sc 
)
inline
void ab::AdmissionService::top_dump_prio ( Hip hip,
unsigned  num_cpu_shift 
)
inline
void ab::AdmissionService::top_dump_scs ( Utcb utcb,
Hip hip,
unsigned &  client_num,
unsigned  num_cpu_shift 
)
inline
void ab::AdmissionService::top_dump_thread ( ClientData volatile *  data,
unsigned  num_sc 
)
inline

Member Data Documentation

AdmissionService ab::AdmissionService::_storage
private
unsigned ab::AdmissionService::cpu_end
private
unsigned ab::AdmissionService::cpu_start
private
unsigned ab::AdmissionService::cursor_pos
static
bool ab::AdmissionService::enable_log
private
bool ab::AdmissionService::enable_measure
private
bool ab::AdmissionService::enable_top
private
bool ab::AdmissionService::enable_verbose
private
char * ab::AdmissionService::flag_revoke
staticprivate
timevalue ab::AdmissionService::global_prio[Config::MAX_CPUS][256]
private
timevalue ab::AdmissionService::global_sum[Config::MAX_CPUS]
private
struct ClientData ab::AdmissionService::idle_scs
private
unsigned ab::AdmissionService::interval
private
struct ClientData ab::AdmissionService::own_scs
private
ab::AdmissionService::ClientData ab::AdmissionService::PACKED
private
struct ab::AdmissionService::MemoryClientData ab::AdmissionService::PACKED
private

The documentation for this class was generated from the following files: