diff options
| author | root <[email protected]> | 2024-07-10 03:04:14 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-07-10 03:04:14 +0000 |
| commit | 5a259e650ff56cb70ddbc26ce962bb164bca9c1a (patch) | |
| tree | 0f061be53dbc4e2332c771672b5b5671999a089d /shaping/src/main.cpp | |
| parent | 23ddf75eaad60fd42693dbf6b9558806247dc519 (diff) | |
add bytehound toolsbytehound_memory_profiling
Diffstat (limited to 'shaping/src/main.cpp')
| -rw-r--r-- | shaping/src/main.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/shaping/src/main.cpp b/shaping/src/main.cpp index 597230b..f2f0323 100644 --- a/shaping/src/main.cpp +++ b/shaping/src/main.cpp @@ -65,6 +65,26 @@ static void sig_handler(int signo) return; } +/*static void signal_nouse_handler(int signo) +{ + printf("%s, SIGNAL:%d recviced!\n", __FUNCTION__, signo); + + bool active = true; + int ret; + ret=mallctl("prof.dump", NULL, NULL, NULL, 0); + printf("mallctl prof.dump return %d\n", ret); + ret=mallctl("prof.active", NULL, NULL, &active, sizeof(bool)); + printf("mallctl prof.active:%d return %d\n", active, ret); + int prof_interval_s=10; + sleep(prof_interval_s); + active = false; + ret=mallctl("prof.active", NULL, NULL, &active, sizeof(bool)); + printf("mallctl prof.active:%d return %d\n", active, ret); + ret=mallctl("prof.dump", NULL, NULL, NULL, 0); + printf("mallctl prof.dump return %d\n", ret); + +}*/ + int main(int argc, char **argv) { struct shaping_ctx *ctx = NULL; @@ -88,6 +108,7 @@ int main(int argc, char **argv) LOG_CLOSE(); return -1; } + /*signal(SIGUSR1, signal_nouse_handler); bool flag = true; int ret = mallctl("background_thread", NULL, NULL, &flag, sizeof(flag)); @@ -95,7 +116,7 @@ int main(int argc, char **argv) LOG_ERROR("%s: mallctl(background_thread) failed, ret %d", LOG_TAG_SHAPING, ret); LOG_CLOSE(); return -1; - } + }*/ ctx = shaping_engine_init(); if (!ctx) { |
