Skip to content

WIP: Lhash optional statistics collection.#4427

Closed
paulidale wants to merge 3 commits intoopenssl:masterfrom
paulidale:lh-nostat
Closed

WIP: Lhash optional statistics collection.#4427
paulidale wants to merge 3 commits intoopenssl:masterfrom
paulidale:lh-nostat

Conversation

@paulidale
Copy link
Contributor

  • documentation is added or updated
  • tests are added or updated

This PR makes the statistics collection in the lhash object optional and disabled by default.
This means zero locking overhead unless the gathering is enabled.

This depends on #4418 for the locking changes to the lhash object. Only the final commit is relevant and this will be squashed before merge.

This is an API breaking change in the sense that the statistics functions OPENSSL_LH_stats and OPENSSL_LH_stats_bio will not function properly without adding an enable call. The other stats calls still work.

Remove atomic operations from the lhash statistics gathering, an inconsistent
output was more than possible.

Instead, use a lock.  The critical sections are deliberately as small as
possible.

The rationale for the NULL checks is to allow a future change to where the
statistics are optional.
…lock is

only ever grabbed once for any operation.
@paulidale
Copy link
Contributor Author

This is WIP until #4418 is resolved.

@dot-asm dot-asm changed the title Lhash optional statistics collection. WIP: Lhash optional statistics collection. Sep 27, 2017
@dot-asm
Copy link
Contributor

dot-asm commented Sep 27, 2017

This is WIP

You can edit subject to denote it as such :-) And apparently I can do it for you. I mean I wanted to test and it worked and I decided to leave it like that...

@paulidale
Copy link
Contributor Author

Thanks.

@paulidale paulidale mentioned this pull request Sep 27, 2017
@paulidale
Copy link
Contributor Author

This PR is unnecessary in light of #4429

@paulidale paulidale closed this Sep 28, 2017
@paulidale paulidale deleted the lh-nostat branch September 28, 2017 00:20
paulidale added a commit to paulidale/openssl that referenced this pull request Oct 4, 2017
indicate the level of locking required for various operations.

Remove the lock and atomics from the lhash code.  These we're not complete
or adequate.

Refer to openssl#4418 and openssl#4427 for details.
levitte pushed a commit that referenced this pull request Oct 8, 2017
indicate the level of locking required for various operations.

Remove the lock and atomics from the lhash code.  These we're not complete
or adequate.

Refer to #4418 and #4427 for details.

Reviewed-by: Rich Salz <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Andy Polyakov <[email protected]>
(Merged from #4429)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants