diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2013-09-18 15:21:34 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 15:16:53 (GMT) |
commit | f1d86b61fb6692c592e937dfb5069e4057855a3b (patch) | |
tree | ebf8feb3c5067a774492f9b52a87446e8d32853f /arch/s390/include/asm/debug.h | |
parent | 4ae803253e4649803dc6e972bb5e59fc107cf474 (diff) | |
download | linux-f1d86b61fb6692c592e937dfb5069e4057855a3b.tar.xz |
s390/s390dbf: add debug_level_enabled() function
Add the debug_level_enabled() function to check if debug events for
a particular level would be logged. This might help to save cycles
for debug events that require additional information collection.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/debug.h')
-rw-r--r-- | arch/s390/include/asm/debug.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 188c505..530c15e 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h @@ -107,6 +107,11 @@ void debug_set_level(debug_info_t* id, int new_level); void debug_set_critical(void); void debug_stop_all(void); +static inline bool debug_level_enabled(debug_info_t* id, int level) +{ + return level <= id->level; +} + static inline debug_entry_t* debug_event(debug_info_t* id, int level, void* data, int length) { |