openssl / project

Tracking of project related issues
2 stars 1 forks source link

Investigate symbolic retrieval of algorithms for internal fetches #543

Closed nhorman closed 6 months ago

nhorman commented 6 months ago

In analyzing our internal fetching code, i've written this: https://github.com/openssl/tools/pull/193

And run perf on it to identify the hotspots in this path.

Results from perf are:

-   10.03%     0.00%  evp_fetch  [.] namenum_cmp                                                                                                 ▒
   - namenum_cmp                                                                                                                                 ▒
        4.49% ossl_lh_strcasehash                                                                                                                ▒
        4.48% getrn                                                                                                                              ▒
        0.61% namenum_cmp                                                                                                                        ▒
+    7.68%     7.08%  evp_fetch  [.] ossl_tolower                                                                                                ▒
+    7.49%     7.49%  evp_fetch  [.] getrn                                                                                                       ▒
+    7.20%     6.68%  evp_fetch  [.] OPENSSL_strcasecmp                                                                                          ▒
+    5.85%     1.77%  evp_fetch  [.] query_cmp                                                                                                   ▒
-    5.84%     2.21%  evp_fetch  [.] CRYPTO_THREAD_read_lock                                                                                     ▒
   + 3.62% CRYPTO_THREAD_read_lock                                                                                                               ◆
     1.11% ossl_method_store_cache_get                                                                                                           ▒
   + 0.56% 0x3832312d53454100                                                                                                                    ▒
   + 0.54% 0x5649532d4d4347                                                                                                                      ▒
-    5.39%     0.63%  evp_fetch  [.] CRYPTO_THREAD_unlock                                                                                        ▒
   + CRYPTO_THREAD_unlock                                                                                                                        ▒
-    5.31%     4.73%  evp_fetch  [.] evp_generic_fetch                                                                                           ▒
   + 1.14% 0x43414d43004341                                                                                                                      ▒
   + 0.66% 0x3542524b00545059                                                                                                                    ▒
   + 0.66% 0x2064656c69614600                                                                                                                    ▒
   + 0.66% 0x5649532d4d4347                                                                                                                      ▒
     0.58% evp_generic_fetch                                                                                                                     ▒
   + 0.57% 0x35322d3341485300                                                                                                                    ▒
   + 0.54% 0x3331594c4f500043                                                                                                                    ▒
   + 0.51% clone3                                                                                                                                ▒
+    4.49%     4.49%  evp_fetch  [.] ossl_lh_strcasehash                                                                                         ▒
+    2.91%     1.81%  evp_fetch  [.] ossl_method_store_cache_get                                                                                 ▒
+    2.30%     2.30%  evp_fetch  [.] ossl_sa_get                                                                                                 ▒
+    1.85%     1.23%  evp_fetch  [.] OPENSSL_LH_strhash                                                                                          ▒
+    1.79%     1.79%  evp_fetch  [.] ossl_namemap_name2num

highlights seem to be: