Repository navigation
Conversation
|
@paulidale, the basic functionality change in |
|
I figured it would be easy based on our discussion. But after the mention of store, I was looking to see how the OSSL_STORE_CTX's |
|
We have too many kinds of stores 😆 |
|
Definitely 😢 |
|
I made some progress, now having OSSL_DECODER_do_all_provided() use this new functionality... and the result is showing with gprof! With master, gprof on a run of the test program from #15199 shows quite a few calls of With the work I've done in this branch, I get this instead: That's 1000 times fewer calls, i.e. 1000 times less allocations of the same methods! I'll try to merge this with #15498 to see what effect that brings. |
|
A decent improvement ≈ 10ms saved. |
Not sure about that... I'm hitting churn elsewhere |
6d5d639 to
261e5cb
Compare
d441be5 to
3614ee9
Compare
|
This is ready for review |
paulidale
left a comment
There was a problem hiding this comment.
Superficially looks pretty good.
d07cfa1 to
897fe40
Compare
|
I just did time measurements with the program from #15199 on the following commits:
Something to remember when evaluating this is that the current master includes a fix for a bug in decoder chain building that unfortunately brought some extra churn. All three OpenSSL's were configured like this: $ ./Configure --debug --strict-warnings enable-fipsAnd the #15199 program was compiled like this for each of them, locally in the OpenSSL build directory: $ cc -pthread -g -O0 -pg -I ./include/ -L . -o 15199 ~/gitwrk/openssl.net/personal/3.0-cases/15199.c libcrypto.a -ldl |
Oh! I dunno why I missed the second one... so, er, the PEM variant |
|
The same sort of measurements on the DER variant:
|
|
So we are not even back at the numbers of alpha17. 😞 |
This reverts c3bcd89 (DECODER: Use pre-fetching when setting up decoders)
…SL_STORE_LOADER_fetch()
bfbbd8d to
317bc0b
Compare
|
With #15737 now merged, this is rebased on top of master. Unless something goes wrong, I'll assume that the current approvals hold. |
Yep. |
It will simply call the given callback for every method found in the given store. Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
…etch() This is refactored to use inner_ossl_decoder_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_decoder_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
…etch() This is refactored to use inner_ossl_encoder_fetch() without any given name, which is just there to ensure all encoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_encoder_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the encoder implementations, or if listing may happen multiple times. Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
This is refactored to use inner_evp_generic_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal evp_generic_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
…c_do_all() Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
Now that we have functions to get the name and properties of the diverse implementations, we can as well display them for clarity. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
If there is an error report, we want to get it printed too. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
…E_LOADER_fetch() This is refactored to use inner_loader_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_store_loader_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #15604)
|
Merged f0191d0 Add the internal function ossl_method_store_do_all() |
It will simply call the given callback for every method found in the given store. Fixes openssl#15538 Fixes openssl#14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
…etch() This is refactored to use inner_ossl_decoder_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_decoder_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Fixes openssl#15538 Fixes openssl#14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
…etch() This is refactored to use inner_ossl_encoder_fetch() without any given name, which is just there to ensure all encoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_encoder_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the encoder implementations, or if listing may happen multiple times. Fixes openssl#15538 Fixes openssl#14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
This is refactored to use inner_evp_generic_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal evp_generic_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Fixes openssl#15538 Fixes openssl#14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
…c_do_all() Fixes openssl#15538 Fixes openssl#14837 Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
Now that we have functions to get the name and properties of the diverse implementations, we can as well display them for clarity. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
If there is an error report, we want to get it printed too. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
…E_LOADER_fetch() This is refactored to use inner_loader_fetch() without any given name, which is just there to ensure all decoder implementations are made into methods, and then use ossl_method_store_do_all() to list them all. This also adds the internal ossl_store_loader_do_all_prefetched(), which can be used if pre-fetching needs to be done separately from listing all the decoder implementations, or if listing may happen multiple times. Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#15604)
This is refactored to use inner_xxx_fetch() without any given
name, which is just there to ensure all decoder implementations are
made into methods, and then use ossl_method_store_do_all() to list
them all.
This also adds the internal xxx_do_all_prefetched(), which
can be used if pre-fetching needs to be done separately from listing
all the decoder implementations, or if listing may happen multiple
times.
Fixes #15538
Fixes #14837