Skip to content
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

stats: unrevert and fix histograms #3262

Merged
merged 2 commits into from
May 3, 2018
Merged

stats: unrevert and fix histograms #3262

merged 2 commits into from
May 3, 2018

Conversation

mattklein123
Copy link
Member

This change unreverts:
#3130
#3183
#3219
Also fixes #3223

Please see the 2nd commit for the actual changes. The changes are:

  1. Bring in a new histogram library version with the fix (and more debug
    checking).
  2. Fix a small issue with scope iteration during merging.
  3. Remove de-dup for histograms until we iterate to shared
    storage for overlapping scope histograms. Personally, I found
    this very confusing when debugging and I think the way I changed
    it is better for now given the code we have.

This reverts commit a12d556.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Member Author

@ramaraochavali @jmarantz @mrice32 PTAL.

Unfortunately, I have some kind of HW issue with my computer and it's randomly crashing under load. I won't be able to get a replacement until Monday morning when I am back from Europe so if there are major changes required to this they are going to have to wait.

@@ -12,6 +12,10 @@ REPOSITORY_LOCATIONS = dict(
commit = "44ae9609e860e3428cd057f7052e505b4819eb84", # 2018-02-06
remote = "https://github.com/bombela/backward-cpp",
),
com_github_circonus_labs_libcircllhist = dict(
commit = "0c44450723e34c9d8768e69b11bf919be83fd2ed", # 2018-04-30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are couple of additional commits that @postwait has added after this. But we can stick with this for now.

@ramaraochavali
Copy link
Contributor

ramaraochavali commented May 1, 2018

@mattklein123 Thanks for putting together this PR. I looked at the second commit and LGTM.

for (ScopeImpl* scope : scopes_) {
for (const auto& name_histogram_pair :
tls_->getTyped<TlsCache>().scope_cache_[scope].histograms_) {
for (const auto& scopes : tls_->getTyped<TlsCache>().scope_cache_) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scopes or scope? Previously it was 'scope' with a concrete type. WDYT of using a concrete type for this one as it's not super-obvious locally what type this resolves to, and I suspect it's not particularly verbose.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure will do. Caveat being that my computer is Fd and I'm having trouble doing anything real so probably will need to wait till Monday.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK go ahead and merge then...I can do these myself easily after you merge. I know we're trying to try these out so no need to delay a week for a style nit.

Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one minor comment.

return **tls_ref;
}

std::unique_lock<std::mutex> lock(parent_.lock_);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to take this lock here. Kinda unrelated side note: I think we can make the getTagsForName method on ThreadLocalStore const.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that's right. I think I also noticed that at some point and then forgot about it amidst all the issues. Thanks for mentioning it. I will see if I can nurse my computer into making some of these small changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattklein123 if you have trouble with your computer, merge this PR and I can do the follow-up PR addressing these minor comments if that’s ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that's fine. @htuch can you approve/merge if this looks good?

@htuch htuch merged commit ec7d1af into master May 3, 2018
@htuch htuch deleted the revert_revert_histo branch May 3, 2018 14:06
ramaraochavali pushed a commit to ramaraochavali/envoy that referenced this pull request May 3, 2018
This change unreverts:
Also fixes envoyproxy#3223

Please see the 2nd commit for the actual changes. The changes are:

Bring in a new histogram library version with the fix (and more debug
checking).
Fix a small issue with scope iteration during merging.
Remove de-dup for histograms until we iterate to shared
storage for overlapping scope histograms. Personally, I found
this very confusing when debugging and I think the way I changed
it is better for now given the code we have.

Signed-off-by: Matt Klein <mklein@lyft.com>
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.

memory corruption in histogram change
5 participants