HPCToolkit
sample_prob.c File Reference
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <messages/messages.h>
#include <lib/support-lean/OSUtil.h>
#include "sample_prob.h"
Include dependency graph for sample_prob.c:

Go to the source code of this file.

Macros

#define HPCRUN_SAMPLE_PROB   "HPCRUN_PROCESS_FRACTION"
 
#define DEFAULT_PROB   0.1
 
#define HASH_PRIME   2001001003
 
#define HASH_GEN   4011
 

Functions

static float string_to_prob (char *str)
 
static float random_hash_prob (void)
 
void hpcrun_sample_prob_init (void)
 
int hpcrun_sample_prob_active (void)
 
void hpcrun_sample_prob_mesg (void)
 

Variables

static int is_init = 0
 
static pid_t orig_pid = 0
 
static int sample_prob_ans = 1
 
static char * sample_prob_str = NULL
 
static int prob_str_broken = 0
 
static int prob_str_mesg = 0
 

Macro Definition Documentation

◆ DEFAULT_PROB

#define DEFAULT_PROB   0.1

Definition at line 62 of file sample_prob.c.

◆ HASH_GEN

#define HASH_GEN   4011

Definition at line 65 of file sample_prob.c.

◆ HASH_PRIME

#define HASH_PRIME   2001001003

Definition at line 64 of file sample_prob.c.

◆ HPCRUN_SAMPLE_PROB

#define HPCRUN_SAMPLE_PROB   "HPCRUN_PROCESS_FRACTION"

Definition at line 61 of file sample_prob.c.

Function Documentation

◆ hpcrun_sample_prob_active()

int hpcrun_sample_prob_active ( void  )

Definition at line 193 of file sample_prob.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hpcrun_sample_prob_init()

void hpcrun_sample_prob_init ( void  )

Definition at line 168 of file sample_prob.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hpcrun_sample_prob_mesg()

void hpcrun_sample_prob_mesg ( void  )

Definition at line 209 of file sample_prob.c.

Here is the caller graph for this function:

◆ random_hash_prob()

static float random_hash_prob ( void  )
static

Definition at line 131 of file sample_prob.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_to_prob()

static float string_to_prob ( char *  str)
static

Definition at line 95 of file sample_prob.c.

Here is the caller graph for this function:

Variable Documentation

◆ is_init

int is_init = 0
static

Definition at line 67 of file sample_prob.c.

◆ orig_pid

pid_t orig_pid = 0
static

Definition at line 68 of file sample_prob.c.

◆ prob_str_broken

int prob_str_broken = 0
static

Definition at line 72 of file sample_prob.c.

◆ prob_str_mesg

int prob_str_mesg = 0
static

Definition at line 73 of file sample_prob.c.

◆ sample_prob_ans

int sample_prob_ans = 1
static

Definition at line 69 of file sample_prob.c.

◆ sample_prob_str

char* sample_prob_str = NULL
static

Definition at line 71 of file sample_prob.c.