Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Conversation

vhbit
Copy link

@vhbit vhbit commented Sep 12, 2014

Jason Evans and others added 12 commits September 9, 2014 15:29
Fix ReadThreadedHeapProfile to pass the correct parameters to
AdjustSamples.
Fix prof_tdata_get() to avoid dereferencing an invalid tdata pointer
(when it's PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

Fix prof_tdata_get() callers to check for invalid results besides NULL
(PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

These regressions were caused by
602c8e0 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
Fix a profile sampling race that was due to preparing to sample, yet
doing nothing to assure that the context remains valid until the stats
are updated.

These regressions were caused by
602c8e0 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
* assertion failure
* malloc_init failure
* malloc not already initialized (in malloc_init)
* running in valgrind
* thread cache disabled at runtime

Clang and GCC already consider a comparison with NULL or -1 to be cold,
so many branches (out-of-memory) are already correctly considered as
cold and marking them is not important.
Fix irallocx_prof() sample logic to only update the threshold counter
after it knows what size the allocation ended up being.  This regression
was caused by 6e73dc1 (Fix a profile
sampling race.), which did not make it into any releases prior to this
fix.
Don't use atomic_add_uint64(), because it isn't available on 32-bit
platforms.

Fix forking support functions to manage all prof-related mutexes.

These regressions were introduced by
602c8e0 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
@alexcrichton
Copy link
Member

It looks like this was also covered in #4, but thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants