X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Futils.h;h=57bec1250fe1ea237b0e6913b0160bd83b3c646c;hp=9f7bfcca1053544e5ebad5d0b52b36f3943ff97a;hb=8ce58badbfbff17e050194e01a9120ac6058bc1c;hpb=70d0b120691e90d81de7b38af8b845e261b5b40c diff --git a/src/bin/lttng/utils.h b/src/bin/lttng/utils.h index 9f7bfcca1..57bec1250 100644 --- a/src/bin/lttng/utils.h +++ b/src/bin/lttng/utils.h @@ -23,4 +23,22 @@ char *get_session_name(void); void list_cmd_options(FILE *ofp, struct poptOption *options); +/* + * Return the minimum order for which x <= (1UL << order). + * Return -1 if x is 0. + */ +int get_count_order_u32(uint32_t x); + +/* + * Return the minimum order for which x <= (1UL << order). + * Return -1 if x is 0. + */ +int get_count_order_u64(uint64_t x); + +/* + * Return the minimum order for which x <= (1UL << order). + * Return -1 if x is 0. + */ +int get_count_order_ulong(unsigned long x); + #endif /* _LTTNG_UTILS_H */