diff options
author | Daniel Latypov <dlatypov@google.com> | 2022-01-26 00:00:09 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-01-31 21:55:27 +0300 |
commit | 6419abb80e82c603bbec6d7f5af6c2f79fa5c4ae (patch) | |
tree | c5d0b5344e3434598dbd5a9d4892eac6d58ebeaf /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 95dcbc55fe4ffe262795bea02a42695c85a22dc4 (diff) | |
download | linux-6419abb80e82c603bbec6d7f5af6c2f79fa5c4ae.tar.xz |
kunit: remove va_format from kunit_assert
The concern is that having a lot of redundant fields in kunit_assert can
blow up stack usage if the compiler doesn't optimize them away [1].
The comment on this field implies that it was meant to be initialized
when the expect/assert was declared, but this only happens when we run
kunit_do_failed_assertion().
We don't need to access it outside of that function, so move it out of
the struct and make it a local variable there.
This change also takes the chance to reduce the number of macros by
inlining the now simplified KUNIT_INIT_ASSERT_STRUCT() macro.
[1] https://groups.google.com/g/kunit-dev/c/i3fZXgvBrfA/m/VULQg1z6BAAJ
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions