mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +03:00
[profile] Allow profiling to be globally enabled or disabled
As with assertions, profiling is enabled for objects built with any debug level (including an explicit debug level of zero). Allow profiling to be globally enabled or disabled by adding PROFILE=1 or PROFILE=0 respectively to the build command line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -12,11 +12,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#include <bits/profile.h>
|
||||
#include <ipxe/tables.h>
|
||||
|
||||
#ifndef PROFILING
|
||||
#ifdef NDEBUG
|
||||
#define PROFILING 0
|
||||
#else
|
||||
#define PROFILING 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A data structure for storing profiling information
|
||||
|
||||
Reference in New Issue
Block a user