-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Help compiller optimize out abd_verify(). #12280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Or should I use "#ifdef ZFS_DEBUG" instead? |
Yes, it'd be better to use ZFS_DEBUG for this since that's how this is handled elsewhere in the code. |
While abd_verify() does nothing when built without debug, compiler can't optimize it out by itself due to calls to external list_*() and abd_verify_scatter(). This commit makes it explicit. Signed-off-by: Alexander Motin <[email protected]> Sponsored-By: iXsystems, Inc.
OK. Changed. I am curios why asserts still depend on NDEBUG, not ZFS_DEBUG as everything else. |
LGTM |
I believe it's something we've just never gotten around to updating since it hasn't been a problem in practice. We probably should make it consistent at some point. |
While abd_verify() does nothing when built without debug, compiler can't optimize it out by itself due to calls to external list_*() and abd_verify_scatter(). This commit makes it explicit. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Adam Moss <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored-By: iXsystems, Inc. Closes openzfs#12280
While abd_verify() does nothing when built without debug, compiler can't optimize it out by itself due to calls to external list_*() and abd_verify_scatter(). This commit makes it explicit. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Adam Moss <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored-By: iXsystems, Inc. Closes openzfs#12280 Conflicts: module/zfs/abd.c
While abd_verify() does nothing when built without debug, compiler
can't optimize it out by itself due to calls to external list_*()
and abd_verify_scatter(). This commit makes it explicit.
Types of changes
Checklist:
Signed-off-by
.