blob: 9335e89bccf915f5155a71557992e819297734cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* rmtop.h - state and rendering declarations for the rmtop dashboard. */
#ifndef RMTOP_H
#define RMTOP_H
#include <time.h>
#include "rmtool.h"
#define RMTOP_VERSION "0.1.0"
#define RMTOP_MAX_ENGINES NV2080_GPU_MAX_ENGINES_LIST_SIZE
struct rmtop_state {
int gpu_minor;
char model[RM_NAME_LEN];
char bdf[RM_BDF_LEN];
char uuid[RM_UUID_LEN];
char driver[80];
int rm_rc;
int have_rm;
char rm_name[RM_NAME_LEN];
NvU32 mc_arch;
NvU32 mc_impl;
NvU32 mc_rev;
NvU8 mc_subrev;
NvU32 vram_total_kib;
NvU32 vram_usable_kib;
NvU32 heap_size_kib;
NvU32 heap_free_kib;
NvU32 bar1_size_kib;
NvU32 bar1_avail_kib;
int have_timer;
NvU64 timer_nsec;
NvU32 engine_count;
NvU32 engine_list[RMTOP_MAX_ENGINES];
char engine_names[RMTOP_MAX_ENGINES][24];
int engine_names_ok;
time_t sampled_at;
};
int rmtop_collect(struct rm_ctx *ctx, struct rmtop_state *st);
void rmtop_render_plain(const struct rmtop_state *st, enum rm_format format);
void rmtop_render_curses(const struct rmtop_state *st, int interval_ms,
int paused);
#endif /* RMTOP_H */
|