units.h 391 B

123456789101112131415161718
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef PERF_UNIT_H
  3. #define PERF_UNIT_H
  4. #include <stddef.h>
  5. #include <linux/types.h>
  6. struct parse_tag {
  7. char tag;
  8. int mult;
  9. };
  10. unsigned long parse_tag_value(const char *str, struct parse_tag *tags);
  11. unsigned long convert_unit(unsigned long value, char *unit);
  12. int unit_number__scnprintf(char *buf, size_t size, u64 n);
  13. #endif /* PERF_UNIT_H */