Fix deadlocks during initialization (#167)
- More to come in later commit, below is just tidying some stuff up
- clang-tidy
- mpi_gotcha quiet about not finding funcs
- update to new papi config
- sampling block_samples / unblock_samples
- disable calling component's sample functions within sampler
- release doesn't strip library
- remove HSA and ROCP env variables from modulefile / setup-env
- preliminary support for LD_PRELOAD usage
- default sampling rate is 300 interrupts / second
- fixes various deadlock issues at startup
This commit is contained in:
1 parent
90ff7188f8
commit
8f36620e29
49 files changed
+866
-342
No files matched your search
@@ -106,8 +106,7 @@ sampler::poll(std::atomic<State>* _state, nsec_t _interval, promise_t* _ready)
|
||||
itr->sample();
|
||||
get_sampler_is_sampling().store(false);
|
||||
if(_has_duration && _now >= _end) break;
|
||||
while(_now < std::chrono::steady_clock::now())
|
||||
_now += _interval;
|
||||
_now = std::chrono::steady_clock::now() + _interval;
|
||||
}
|
||||
|
||||
// ensure this is always false
|
||||
@@ -167,16 +166,13 @@ sampler::setup()
|
||||
auto _freq = get_process_sampling_freq();
|
||||
uint64_t _msec_freq = (1.0 / _freq) * 1.0e3;
|
||||
|
||||
promise_t _prom{};
|
||||
auto _fut = _prom.get_future();
|
||||
polling_finished = std::make_unique<promise_t>();
|
||||
|
||||
OMNITRACE_SCOPED_SAMPLING_ON_CHILD_THREADS(false);
|
||||
|
||||
set_state(State::PreInit);
|
||||
get_thread() = std::make_unique<std::thread>(&poll<msec_t>, &get_sampler_state(),
|
||||
msec_t{ _msec_freq }, &_prom);
|
||||
_fut.wait();
|
||||
msec_t{ _msec_freq }, nullptr);
|
||||
|
||||
set_state(State::Active);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user