]> arthur.barton.de Git - netdata.git/commitdiff
code cleanup
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Mar 2015 22:41:23 +0000 (01:41 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Mar 2015 22:41:23 +0000 (01:41 +0300)
src/plugins.d/apps_plugin.c
src/procfile.c

index 6cbb6d258178c1b62a519c2b7257cc30126efda7..46f8ed758dae1c993253617e308e85c45cda30b6 100755 (executable)
@@ -675,7 +675,7 @@ int read_proc_pid_stat(struct pid_stat *p) {
        // p->guest_time        = strtoull(procfile_lineword(ff, 0, 42), NULL, 10);
        // p->cguest_time       = strtoull(procfile_lineword(ff, 0, 43), NULL, 10);
 
-       if(debug || (p->target && p->target->debug)) fprintf(stderr, "apps.plugin: VALUES: %s utime=%llu, stime=%llu, cutime=%llu, cstime=%llu, minflt=%llu, majflt=%llu, cminflt=%llu, cmajflt=%llu\n", p->comm, p->utime, p->stime, p->cutime, p->cstime, p->minflt, p->majflt, p->cminflt, p->cmajflt);
+       if(debug || (p->target && p->target->debug)) fprintf(stderr, "apps.plugin: VALUES: %s utime=%llu, stime=%llu, cutime=%llu, cstime=%llu, minflt=%llu, majflt=%llu, cminflt=%llu, cmajflt=%llu, threads=%d\n", p->comm, p->utime, p->stime, p->cutime, p->cstime, p->minflt, p->majflt, p->cminflt, p->cmajflt, p->num_threads);
 
        procfile_close(ff);
        return 0;
index 26e717b2a1a05dca8fe37a5728c577c309007155..aed26f9c981e4cfeb8a58d5e4fee957cb8baccc0 100755 (executable)
 #define PFWORDS_INCREASE_STEP 200
 
 pfwords *pfwords_add(pfwords *fw, char *str) {
-       debug(D_PROCFILE, PF_PREFIX ":  adding word No %d: '%s'", fw->len, str);
+       // debug(D_PROCFILE, PF_PREFIX ":       adding word No %d: '%s'", fw->len, str);
 
        if(fw->len == fw->size) {
-               debug(D_PROCFILE, PF_PREFIX ":  expanding words");
+               // debug(D_PROCFILE, PF_PREFIX ":       expanding words");
 
                pfwords *new = realloc(fw, sizeof(pfwords) + (fw->size + PFWORDS_INCREASE_STEP) * sizeof(char *));
                if(!new) {
@@ -47,7 +47,7 @@ pfwords *pfwords_add(pfwords *fw, char *str) {
 }
 
 pfwords *pfwords_new(void) {
-       debug(D_PROCFILE, PF_PREFIX ":  initializing words");
+       // debug(D_PROCFILE, PF_PREFIX ":       initializing words");
 
        pfwords *new = malloc(sizeof(pfwords) + PFWORDS_INCREASE_STEP * sizeof(char *));
        if(!new) return NULL;
@@ -58,12 +58,12 @@ pfwords *pfwords_new(void) {
 }
 
 void pfwords_reset(pfwords *fw) {
-       debug(D_PROCFILE, PF_PREFIX ":  reseting words");
+       // debug(D_PROCFILE, PF_PREFIX ":       reseting words");
        fw->len = 0;
 }
 
 void pfwords_free(pfwords *fw) {
-       debug(D_PROCFILE, PF_PREFIX ":  freeing words");
+       // debug(D_PROCFILE, PF_PREFIX ":       freeing words");
 
        free(fw);
 }
@@ -75,10 +75,10 @@ void pfwords_free(pfwords *fw) {
 #define PFLINES_INCREASE_STEP 10
 
 pflines *pflines_add(pflines *fl, uint32_t first_word) {
-       debug(D_PROCFILE, PF_PREFIX ":  adding line %d at word %d", fl->len, first_word);
+       // debug(D_PROCFILE, PF_PREFIX ":       adding line %d at word %d", fl->len, first_word);
 
        if(fl->len == fl->size) {
-               debug(D_PROCFILE, PF_PREFIX ":  expanding lines");
+               // debug(D_PROCFILE, PF_PREFIX ":       expanding lines");
 
                pflines *new = realloc(fl, sizeof(pflines) + (fl->size + PFLINES_INCREASE_STEP) * sizeof(ffline));
                if(!new) {
@@ -97,7 +97,7 @@ pflines *pflines_add(pflines *fl, uint32_t first_word) {
 }
 
 pflines *pflines_new(void) {
-       debug(D_PROCFILE, PF_PREFIX ":  initializing lines");
+       // debug(D_PROCFILE, PF_PREFIX ":       initializing lines");
 
        pflines *new = malloc(sizeof(pflines) + PFLINES_INCREASE_STEP * sizeof(ffline));
        if(!new) return NULL;
@@ -108,13 +108,13 @@ pflines *pflines_new(void) {
 }
 
 void pflines_reset(pflines *fl) {
-       debug(D_PROCFILE, PF_PREFIX ":  reseting lines");
+       // debug(D_PROCFILE, PF_PREFIX ":       reseting lines");
 
        fl->len = 0;
 }
 
 void pflines_free(pflines *fl) {
-       debug(D_PROCFILE, PF_PREFIX ":  freeing lines");
+       // debug(D_PROCFILE, PF_PREFIX ":       freeing lines");
 
        free(fl);
 }