debug for negative number of threads
Costa Tsaousis (ktsaou) committed
Mar 30, 2015 at 02:19 UTC
fd02455069dbe9e174a63f0e06ef2a4f071d5892
1 file changed
+3
src/plugins.d/apps_plugin.c
+3
@@ -1375,6 +1375,9 @@ void update_statistics(void)
1375
p->target->minflt += p->minflt; //+ (p->pid != 1)?(p->cminflt - p->fix_cminflt):0;
1376
p->target->majflt += p->majflt; //+ (p->pid != 1)?(p->cmajflt - p->fix_cmajflt):0;
1377
1378
+ if(p->num_threads < 0)
1379
+ error("Negative threads number for pid '%s': %d", p->comm, p->num_threads);
1380
+
1381
p->target->num_threads += p->num_threads;
1382
p->target->rss += p->rss;
1383