|
|
|
@ -97,7 +97,7 @@ char *profiling_csv_file_name;
|
|
|
|
const char *profiling_packets_file_mode = "a";
|
|
|
|
const char *profiling_packets_file_mode = "a";
|
|
|
|
|
|
|
|
|
|
|
|
static int rate = 1;
|
|
|
|
static int rate = 1;
|
|
|
|
static SC_ATOMIC_DECL_AND_INIT(uint64_t, samples);
|
|
|
|
static SC_ATOMIC_DECLARE(uint64_t, samples);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Used as a check so we don't double enter a profiling run.
|
|
|
|
* Used as a check so we don't double enter a profiling run.
|
|
|
|
@ -126,6 +126,8 @@ SCProfilingInit(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ConfNode *conf;
|
|
|
|
ConfNode *conf;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SC_ATOMIC_INIT(samples);
|
|
|
|
|
|
|
|
|
|
|
|
intmax_t rate_v = 0;
|
|
|
|
intmax_t rate_v = 0;
|
|
|
|
(void)ConfGetInt("profiling.sample-rate", &rate_v);
|
|
|
|
(void)ConfGetInt("profiling.sample-rate", &rate_v);
|
|
|
|
if (rate_v > 0 && rate_v < INT_MAX) {
|
|
|
|
if (rate_v > 0 && rate_v < INT_MAX) {
|
|
|
|
|