API Reference Manual  1.45.0
ODP SYSTEM

API Description

System information.

Data Structures

union  odp_cpu_arch_isa_t
 CPU ISA versions. More...
 
struct  odp_system_info_t
 System info. More...
 
struct  odp_system_meminfo_t
 Memory information. More...
 
struct  odp_system_memblock_t
 Memory block information. More...
 

Macros

#define ODP_SYSTEM_MEMBLOCK_NAME_LEN   64
 Maximum memory block name length in chars (including null char)
 

Typedefs

typedef enum odp_cpu_arch_t odp_cpu_arch_t
 CPU instruction set architecture (ISA) families.
 
typedef enum odp_cpu_arch_arm_t odp_cpu_arch_arm_t
 ARM ISA versions. More...
 
typedef enum odp_cpu_arch_mips_t odp_cpu_arch_mips_t
 MIPS ISA versions.
 
typedef enum odp_cpu_arch_ppc_t odp_cpu_arch_ppc_t
 PowerPC ISA versions.
 
typedef enum odp_cpu_arch_riscv_t odp_cpu_arch_riscv_t
 RISC-V ISA versions.
 
typedef enum odp_cpu_arch_x86_t odp_cpu_arch_x86_t
 x86 ISA versions
 
typedef union odp_cpu_arch_isa_t odp_cpu_arch_isa_t
 CPU ISA versions.
 
typedef struct odp_system_info_t odp_system_info_t
 System info.
 
typedef struct odp_system_meminfo_t odp_system_meminfo_t
 Memory information.
 
typedef struct odp_system_memblock_t odp_system_memblock_t
 Memory block information.
 

Enumerations

enum  odp_cpu_arch_t {
  ODP_CPU_ARCH_UNKNOWN = 0 , ODP_CPU_ARCH_ARM , ODP_CPU_ARCH_MIPS , ODP_CPU_ARCH_PPC ,
  ODP_CPU_ARCH_RISCV , ODP_CPU_ARCH_X86
}
 CPU instruction set architecture (ISA) families. More...
 
enum  odp_cpu_arch_arm_t {
  ODP_CPU_ARCH_ARM_UNKNOWN = 0 , ODP_CPU_ARCH_ARMV6 , ODP_CPU_ARCH_ARMV7 , ODP_CPU_ARCH_ARMV8_0 ,
  ODP_CPU_ARCH_ARMV8_1 , ODP_CPU_ARCH_ARMV8_2 , ODP_CPU_ARCH_ARMV8_3 , ODP_CPU_ARCH_ARMV8_4 ,
  ODP_CPU_ARCH_ARMV8_5 , ODP_CPU_ARCH_ARMV8_6 , ODP_CPU_ARCH_ARMV8_7 , ODP_CPU_ARCH_ARMV8_8 ,
  ODP_CPU_ARCH_ARMV8_9 , ODP_CPU_ARCH_ARMV9_0 , ODP_CPU_ARCH_ARMV9_1 , ODP_CPU_ARCH_ARMV9_2 ,
  ODP_CPU_ARCH_ARMV9_3
}
 ARM ISA versions. More...
 
enum  odp_cpu_arch_mips_t { ODP_CPU_ARCH_MIPS_UNKNOWN = 0 }
 MIPS ISA versions. More...
 
enum  odp_cpu_arch_ppc_t { ODP_CPU_ARCH_PPC_UNKNOWN = 0 }
 PowerPC ISA versions. More...
 
enum  odp_cpu_arch_riscv_t { ODP_CPU_ARCH_RISCV_UNKNOWN = 0 }
 RISC-V ISA versions. More...
 
enum  odp_cpu_arch_x86_t { ODP_CPU_ARCH_X86_UNKNOWN = 0 , ODP_CPU_ARCH_X86_I686 , ODP_CPU_ARCH_X86_64 }
 x86 ISA versions More...
 

Functions

int odp_system_info (odp_system_info_t *info)
 Retrieve system information. More...
 
int32_t odp_system_meminfo (odp_system_meminfo_t *info, odp_system_memblock_t block[], int32_t num)
 Retrieve ODP memory usage information. More...
 
uint64_t odp_sys_huge_page_size (void)
 Default system huge page size in bytes. More...
 
int odp_sys_huge_page_size_all (uint64_t size[], int num)
 System huge page sizes in bytes. More...
 
uint64_t odp_sys_page_size (void)
 Page size in bytes. More...
 
int odp_sys_cache_line_size (void)
 Cache line size in bytes. More...
 
void odp_sys_info_print (void)
 Print system info. More...
 
void odp_sys_config_print (void)
 Print configuration. More...
 

Typedef Documentation

◆ odp_cpu_arch_arm_t

ARM ISA versions.

ISA versions are defined in ascending order.

Enumeration Type Documentation

◆ odp_cpu_arch_t

CPU instruction set architecture (ISA) families.

Enumerator
ODP_CPU_ARCH_UNKNOWN 

Unknown CPU architecture.

ODP_CPU_ARCH_ARM 

ARM.

ODP_CPU_ARCH_MIPS 

MIPS.

ODP_CPU_ARCH_PPC 

PowerPC.

ODP_CPU_ARCH_RISCV 

RISC-V.

ODP_CPU_ARCH_X86 

x86

Definition at line 31 of file spec/system_info.h.

◆ odp_cpu_arch_arm_t

ARM ISA versions.

ISA versions are defined in ascending order.

Enumerator
ODP_CPU_ARCH_ARM_UNKNOWN 

Unknown ARM ISA version.

ODP_CPU_ARCH_ARMV6 

ARMv6 ISA.

ODP_CPU_ARCH_ARMV7 

ARMv7-A ISA.

ODP_CPU_ARCH_ARMV8_0 

ARMv8.0-A ISA.

ODP_CPU_ARCH_ARMV8_1 

ARMv8.1-A ISA.

ODP_CPU_ARCH_ARMV8_2 

ARMv8.2-A ISA.

ODP_CPU_ARCH_ARMV8_3 

ARMv8.3-A ISA.

ODP_CPU_ARCH_ARMV8_4 

ARMv8.4-A ISA.

ODP_CPU_ARCH_ARMV8_5 

ARMv8.5-A ISA.

ODP_CPU_ARCH_ARMV8_6 

ARMv8.6-A ISA.

ODP_CPU_ARCH_ARMV8_7 

ARMv8.7-A ISA.

ODP_CPU_ARCH_ARMV8_8 

ARMv8.8-A ISA.

ODP_CPU_ARCH_ARMV8_9 

ARMv8.9-A ISA.

ODP_CPU_ARCH_ARMV9_0 

ARMv9.0-A ISA.

ODP_CPU_ARCH_ARMV9_1 

ARMv9.1-A ISA.

ODP_CPU_ARCH_ARMV9_2 

ARMv9.2-A ISA.

ODP_CPU_ARCH_ARMV9_3 

ARMv9.3-A ISA.

Definition at line 57 of file spec/system_info.h.

◆ odp_cpu_arch_mips_t

MIPS ISA versions.

Enumerator
ODP_CPU_ARCH_MIPS_UNKNOWN 

Unknown MIPS ISA version.

Definition at line 114 of file spec/system_info.h.

◆ odp_cpu_arch_ppc_t

PowerPC ISA versions.

Enumerator
ODP_CPU_ARCH_PPC_UNKNOWN 

Unknown PPC ISA version.

Definition at line 123 of file spec/system_info.h.

◆ odp_cpu_arch_riscv_t

RISC-V ISA versions.

Enumerator
ODP_CPU_ARCH_RISCV_UNKNOWN 

Unknown RISC-V ISA version.

Definition at line 132 of file spec/system_info.h.

◆ odp_cpu_arch_x86_t

x86 ISA versions

Enumerator
ODP_CPU_ARCH_X86_UNKNOWN 

Unknown x86 ISA version.

ODP_CPU_ARCH_X86_I686 

x86 32bit ISA

ODP_CPU_ARCH_X86_64 

x86 64bit ISA

Definition at line 141 of file spec/system_info.h.

Function Documentation

◆ odp_system_info()

int odp_system_info ( odp_system_info_t info)

Retrieve system information.

Fills in system information structure on success. The call is not intended for fast path use.

Parameters
[out]infoPointer to system info struct for output
Return values
0on success
<0on failure
Examples
odp_sysinfo.c.

◆ odp_system_meminfo()

int32_t odp_system_meminfo ( odp_system_meminfo_t info,
odp_system_memblock_t  block[],
int32_t  num 
)

Retrieve ODP memory usage information.

Retrieves information about ODP memory usage for debugging and monitoring purposes. A successful call fills in system memory info and outputs up to 'num' elements into memory block info array. Each array element represents a memory block used due to an API call (SHM reservation, pool creation, etc) or an implementation internal memory allocation.

When return value is 'num' or less, it indicates the number of elements written. If return value is larger than 'num', all 'num' elements were written and the return value indicates the number of elements that would have been written into a large enough array.

Parameters
[out]infoPointer to memory info struct for output
[out]blockPointer memory block info array for output
numMaximum number of array elements to output (0 ... array size)
Returns
Number of array elements written / would have been written
Return values
<0on failure

◆ odp_sys_huge_page_size()

uint64_t odp_sys_huge_page_size ( void  )

Default system huge page size in bytes.

Returns
Default huge page size in bytes
Return values
0on no huge pages
Examples
odp_sysinfo.c.

◆ odp_sys_huge_page_size_all()

int odp_sys_huge_page_size_all ( uint64_t  size[],
int  num 
)

System huge page sizes in bytes.

Returns the number of huge page sizes supported by the system. Outputs up to 'num' sizes when the 'size' array pointer is not NULL. If return value is larger than 'num', there are more supported sizes than the function was allowed to output. If return value (N) is less than 'num', only sizes [0 ... N-1] have been written. Returned values are ordered from smallest to largest.

Parameters
[out]sizePoints to an array of huge page sizes for output
numMaximum number of huge page sizes to output
Returns
Number of supported huge page sizes
Return values
<0on failure
Examples
odp_sysinfo.c.

◆ odp_sys_page_size()

uint64_t odp_sys_page_size ( void  )

Page size in bytes.

Returns
Page size in bytes
Examples
odp_sysinfo.c.

◆ odp_sys_cache_line_size()

int odp_sys_cache_line_size ( void  )

Cache line size in bytes.

Returns
CPU cache line size in bytes
Examples
odp_sysinfo.c.

◆ odp_sys_info_print()

◆ odp_sys_config_print()

void odp_sys_config_print ( void  )

Print configuration.

Print out implementation defined information about selected configuration options. This information is intended for debugging purposes and may contain e.g. content of various configuration files, environment variables and configuration options of ODP API.

Examples
odp_debug.c, and odp_sysinfo.c.