Skip to content

Commit 344e805

Browse files
committed
[cov] Add OT_NO_COVERAGE attribute macro
This macro allows marking functions to be excluded from coverage instrumentation, which is useful for functions that are called in contexts where coverage instrumentation would cause issues. Change-Id: I0163ca4d132f2f58f287c84b773fdd5b5d1e7f76 Signed-off-by: Yi-Hsuan Deng <[email protected]>
1 parent 07249a9 commit 344e805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sw/device/lib/base/macros.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,4 +750,9 @@ class SignConverter {
750750
})
751751
#endif
752752

753+
/**
754+
* Attribute on function declarations to disable coverage instrumentation.
755+
*/
756+
#define OT_NO_COVERAGE __attribute__((no_profile_instrument_function))
757+
753758
#endif // OPENTITAN_SW_DEVICE_LIB_BASE_MACROS_H_

0 commit comments

Comments
 (0)