102 memset((
void *)it->
jb,
'\0',
sizeof(it->
jb));
118 frame_t* bt_last,
int metricId,
132 bt.
fence = FENCE_BAD;
137 TMSG(PARTIAL_UNW,
"recording partial unwind from segv");
141 false, metricId, metricIncr, custom_update);
153 TMSG(DROP,
"dropping sample");
167 if (monitor_block_shootdown()) {
168 monitor_unblock_shootdown();
181 TMSG(SAMPLE,
"global suspension");
183 monitor_unblock_shootdown();
190 #ifndef HPCRUN_STATIC_LINK 195 TMSG(SAMPLE_CALLPATH,
"skipping sample for dlopen lock");
197 monitor_unblock_shootdown();
202 TMSG(SAMPLE_CALLPATH,
"attempting sample");
220 int ljmp = sigsetjmp(it->
jb, 1);
225 TMSG(SAMPLE_CALLPATH,
"%s taking profile sample @ %p", __func__, pc);
226 TMSG(SAMPLE_METRIC_DATA,
"--metric data for sample (as a uint64_t) = %"PRIu64
"", metricIncr);
236 metricIncr, skipInner, isSync, data_aux);
238 if (
ENABLED(DUMP_BACKTRACES)) {
246 metricId, metricIncr, skipInner,
NULL);
284 TMSG(TRACE1,
"trace ok (!deadlock drop) = %d", trace_ok);
286 TMSG(TRACE,
"Sample event encountered");
298 TMSG(TRACE,
"Changed persistent id to indicate mutation of func_proxy node");
301 TMSG(TRACE,
"Appended func_proxy node to trace");
309 #ifndef HPCRUN_STATIC_LINK 314 monitor_unblock_shootdown();
324 if (monitor_block_shootdown()) {
325 monitor_unblock_shootdown();
330 TMSG(THREAD_CTXT,
"global suspension");
332 monitor_unblock_shootdown();
339 #ifndef HPCRUN_STATIC_LINK 354 int ljmp = sigsetjmp(it->
jb, 1);
361 EMSG(
"Internal error: unable to obtain backtrace for pthread context");
370 TMSG(THREAD_CTXT,
"Thread correction, back off outermost backtrace entry");
384 metricId, metricIncr);
393 #ifndef HPCRUN_STATIC_LINK 397 TMSG(THREAD,
"done w pthread ctxt");
398 monitor_unblock_shootdown();
void hpcrun_set_handling_sample(thread_data_t *td)
void hpcrun_stats_num_samples_dropped_inc(void)
void hpcrun_stats_num_samples_blocked_dlopen_inc(void)
static void hpcrun_cleanup_partial_unwind(void)
static int const PTHREAD_CTXT_SKIP_INNER
struct cct_custom_update_s sample_custom_cct
void hpcrun_stats_num_samples_total_inc(void)
bool private_hpcrun_sampling_disabled
void hpcrun_stats_num_samples_attempted_inc(void)
void hpcrun_dlopen_read_unlock(void)
sample_val_t hpcrun_sample_callpath(void *context, int metricId, hpcrun_metricVal_t metricIncr, int skipInner, int isSync, sampling_info_t *data)
void hpcrun_stats_num_samples_partial_inc(void)
static spinlock_t fnbounds_lock
void hpcrun_trace_append(core_profile_trace_data_t *cptd, cct_node_t *node, uint metric_id)
ip_normalized_t the_function
static bool hpcrun_is_sampling_disabled(void)
cct_node_t * hpcrun_cct_record_backtrace(cct_bundle_t *cct, bool partial, backtrace_info_t *bt, bool tramp_found)
cct_node_t * hpcrun_cct_record_backtrace_w_metric(cct_bundle_t *cct, bool partial, backtrace_info_t *bt, bool tramp_found, int metricId, hpcrun_metricVal_t metricIncr, struct cct_custom_update_s *custom_update)
void hpcrun_all_sources_stop(void)
bool hpcrun_generate_backtrace_no_trampoline(backtrace_info_t *bt, ucontext_t *context, int skipInner)
void fnbounds_release_lock(void)
cct_node_t * hpcrun_cct_parent(cct_node_t *x)
void hpcrun_up_pmsg_count(void)
cct_node_t * hpcrun_cct_insert_addr(cct_node_t *node, cct_addr_t *frm)
int hpcrun_dlopen_read_lock(void)
int hpcrun_trace_isactive()
void hpcrun_flush_epochs(core_profile_trace_data_t *cptd)
epoch_t * hpcrun_check_for_new_loadmap(epoch_t *epoch)
core_profile_trace_data_t core_profile_trace_data
sigjmp_buf_t * current_jmp_buf
cct_node_t * hpcrun_backtrace2cct(cct_bundle_t *cct, ucontext_t *context, int metricId, hpcrun_metricVal_t metricIncr, int skipInner, int isSync, struct cct_custom_update_s *custom_update)
frame_t * hpcrun_skip_chords(frame_t *bt_outer, frame_t *bt_inner, int skip)
static bool ip_normalized_eq(const ip_normalized_t *a, const ip_normalized_t *b)
void hpcrun_clear_handling_sample(thread_data_t *td)
cct_node_t * hpcrun_gen_thread_ctxt(void *context)
void hpcrun_drop_sample(void)
void hpcrun_bt_dump(frame_t *unwind, const char *tag)
void hpcrun_reclaim_freeable_mem(void)
siglongjmp_fcn * hpcrun_get_real_siglongjmp(void)
void * hpcrun_context_pc(void *context)
static cct_node_t * record_partial_unwind(cct_bundle_t *cct, frame_t *bt_beg, frame_t *bt_last, int metricId, hpcrun_metricVal_t metricIncr, int skipInner, struct cct_custom_update_s *custom_update)
static void hpcrun_sample_val_init(sample_val_t *x)
thread_data_t *(* hpcrun_get_thread_data)(void)
cct_addr_t * hpcrun_cct_addr(cct_node_t *node)