30static inline uint64_t get_timestamp(
void) {
32 clock_gettime(CLOCK_MONOTONIC_RAW, &t);
33 return (uint64_t)t.tv_sec * 1000000000LL + (uint64_t)t.tv_nsec;
36static inline bool plugin_gpu_use_low_level_api(
void) {
38 const char *env = getenv(
"DLB_PLUGIN_GPU_USE_LOW_LEVEL_API");
39 if (env && (*env ==
'1' || *env ==
'y' || *env ==
'Y')) {
46static inline int plugin_is_verbose(
void) {
47 static int initialized = 0;
51 const char *env = getenv(
"DLB_PLUGIN_VERBOSE");
52 if (env && (*env ==
'1' || *env ==
'y' || *env ==
'Y')) {
60#define PLUGIN_PRINT(fmt, ...) \
61 do { if (plugin_is_verbose()) fprintf(stderr, "[DLB PLUGIN] " fmt, ##__VA_ARGS__); } while (0)
63#define PLUGIN_ERROR(fmt, ...) \
64 do { fprintf(stderr, "[DLB PLUGIN ERROR] " fmt, ##__VA_ARGS__); } while (0)
66#define PLUGIN_WARNING(fmt, ...) \
67 do { fprintf(stderr, "[DLB PLUGIN WARNING] " fmt, ##__VA_ARGS__); } while (0)
#define verbose(flag,...)
Definition: debug.h:75