2 * Copyright (C) ARM Limited 2010-2015. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
12 #define STRIFY2(ARG) #ARG
13 #define STRIFY(ARG) STRIFY2(ARG)
15 #define ARRAY_LENGTH(A) static_cast<int>(sizeof(A)/sizeof((A)[0]))
16 #define ACCESS_ONCE(x) (*(volatile typeof(x)*)&(x))
18 #define MAX_PERFORMANCE_COUNTERS 50
21 // If debugfs is not mounted at /sys/kernel/debug, update TRACING_PATH
22 #define TRACING_PATH "/sys/kernel/debug/tracing"
23 #define EVENTS_PATH TRACING_PATH "/events"
26 static inline T min(const T a, const T b) {
27 return (a < b ? a : b);
31 static inline T max(const T a, const T b) {
32 return (a > b ? a : b);