MOS Source Code
Loading...
Searching...
No Matches
mmstat.h File Reference
#include <mos/types.h>
+ Include dependency graph for mmstat.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vmap_stat_t
 Memory usage statistics for a specific vmap area. More...
 

Macros

#define mmstat_inc1(type)
 
#define mmstat_dec1(type)
 
#define vmap_stat_inc(vmap, type)
 
#define vmap_stat_dec(vmap, type)
 

Enumerations

enum  mmstat_type_t {
  MEM_PAGETABLE , MEM_SLAB , MEM_PAGECACHE , MEM_KERNEL ,
  MEM_USER , _MEM_MAX_TYPES
}
 

Functions

void mmstat_inc (mmstat_type_t type, size_t size)
 Increment the memory usage statistics.
 
void mmstat_dec (mmstat_type_t type, size_t size)
 Decrement the memory usage statistics.
 

Variables

const char * mem_type_names [_MEM_MAX_TYPES]
 

Macro Definition Documentation

◆ mmstat_inc1

#define mmstat_inc1 ( type)
Value:
mmstat_inc(type, 1)
void mmstat_inc(mmstat_type_t type, size_t size)
Increment the memory usage statistics.
Definition mmstat.c:33

Definition at line 26 of file mmstat.h.

Referenced by __create_page_table(), and pagecache_get_page_for_read().

◆ mmstat_dec1

#define mmstat_dec1 ( type)
Value:
mmstat_dec(type, 1)
void mmstat_dec(mmstat_type_t type, size_t size)
Decrement the memory usage statistics.
Definition mmstat.c:39

Definition at line 35 of file mmstat.h.

Referenced by __destroy_page_table(), and do_flush_and_drop_cached_page().

◆ vmap_stat_inc

#define vmap_stat_inc ( vmap,
type )
Value:
(vmap)->stat.type += 1
static vmap_global_mstat_t stat[_MEM_MAX_TYPES]
Definition mmstat.c:23

Definition at line 70 of file mmstat.h.

Referenced by cow_zod_fault_handler(), and vfs_fault_handler().

◆ vmap_stat_dec

#define vmap_stat_dec ( vmap,
type )
Value:
(vmap)->stat.type -= 1

Definition at line 71 of file mmstat.h.

Referenced by cow_zod_fault_handler(), and vfs_fault_handler().

Enumeration Type Documentation

◆ mmstat_type_t

Enumerator
MEM_PAGETABLE 
MEM_SLAB 
MEM_PAGECACHE 
MEM_KERNEL 
MEM_USER 
_MEM_MAX_TYPES 

Definition at line 6 of file mmstat.h.

Function Documentation

◆ mmstat_inc()

void mmstat_inc ( mmstat_type_t type,
size_t size )

Increment the memory usage statistics.

Parameters
typeThe type of memory.
sizeThe size of memory.

Definition at line 33 of file mmstat.c.

Referenced by slab_impl_new_page().

◆ mmstat_dec()

void mmstat_dec ( mmstat_type_t type,
size_t size )

Decrement the memory usage statistics.

Parameters
typeThe type of memory.
sizeThe size of memory.

Definition at line 39 of file mmstat.c.

Referenced by slab_impl_free_page().

Variable Documentation

◆ mem_type_names

const char* mem_type_names[_MEM_MAX_TYPES]
extern

Definition at line 25 of file mmstat.c.

Referenced by mmstat_sysfs_stat().