regulator: s2mps11: Adjust supported buck voltages to real values
[linux/fpc-iii.git] / tools / perf / util / intel-pt-decoder / intel-pt-log.h
blobcc084937f701acfa16bc3eb3623aab7e6ed429d2
1 /*
2 * intel_pt_log.h: Intel Processor Trace support
3 * Copyright (c) 2013-2014, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
16 #ifndef INCLUDE__INTEL_PT_LOG_H__
17 #define INCLUDE__INTEL_PT_LOG_H__
19 #include <linux/compiler.h>
20 #include <stdint.h>
21 #include <inttypes.h>
23 struct intel_pt_pkt;
25 void *intel_pt_log_fp(void);
26 void intel_pt_log_enable(void);
27 void intel_pt_log_disable(void);
28 void intel_pt_log_set_name(const char *name);
30 void __intel_pt_log_packet(const struct intel_pt_pkt *packet, int pkt_len,
31 uint64_t pos, const unsigned char *buf);
33 struct intel_pt_insn;
35 void __intel_pt_log_insn(struct intel_pt_insn *intel_pt_insn, uint64_t ip);
36 void __intel_pt_log_insn_no_data(struct intel_pt_insn *intel_pt_insn,
37 uint64_t ip);
39 void __intel_pt_log(const char *fmt, ...) __printf(1, 2);
41 #define intel_pt_log(fmt, ...) \
42 do { \
43 if (intel_pt_enable_logging) \
44 __intel_pt_log(fmt, ##__VA_ARGS__); \
45 } while (0)
47 #define intel_pt_log_packet(arg, ...) \
48 do { \
49 if (intel_pt_enable_logging) \
50 __intel_pt_log_packet(arg, ##__VA_ARGS__); \
51 } while (0)
53 #define intel_pt_log_insn(arg, ...) \
54 do { \
55 if (intel_pt_enable_logging) \
56 __intel_pt_log_insn(arg, ##__VA_ARGS__); \
57 } while (0)
59 #define intel_pt_log_insn_no_data(arg, ...) \
60 do { \
61 if (intel_pt_enable_logging) \
62 __intel_pt_log_insn_no_data(arg, ##__VA_ARGS__); \
63 } while (0)
65 #define x64_fmt "0x%" PRIx64
67 extern bool intel_pt_enable_logging;
69 static inline void intel_pt_log_at(const char *msg, uint64_t u)
71 intel_pt_log("%s at " x64_fmt "\n", msg, u);
74 static inline void intel_pt_log_to(const char *msg, uint64_t u)
76 intel_pt_log("%s to " x64_fmt "\n", msg, u);
79 #endif