Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
This commit is contained in:
commit
9135fd26c4
@ -323,18 +323,16 @@ static void process_irq_counts(void)
|
|||||||
*/
|
*/
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
/* Deal with non-maskable interrupts -- make up fake numbers */
|
/* Deal with non-maskable interrupts -- make up fake numbers */
|
||||||
nr = index_in_strings("NMI\0RES\nCAL\0TLB\0TRM\0THR\0SPU\0", buf);
|
nr = index_in_strings("NMI\0RES\0CAL\0TLB\0TRM\0THR\0SPU\0", buf);
|
||||||
if (nr != -1) {
|
if (nr >= 0) {
|
||||||
nr += 20000;
|
nr += 20000;
|
||||||
} else {
|
} else {
|
||||||
/* bb_strtou doesn't eat leading spaces, using strtoul */
|
/* bb_strtou doesn't eat leading spaces, using strtoul */
|
||||||
|
errno = 0;
|
||||||
nr = strtoul(buf, NULL, 10);
|
nr = strtoul(buf, NULL, 10);
|
||||||
|
if (errno)
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
*p = ':';
|
|
||||||
|
|
||||||
if (nr == -1)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
p++;
|
p++;
|
||||||
/* 0: 143646045 153901007 IO-APIC-edge timer
|
/* 0: 143646045 153901007 IO-APIC-edge timer
|
||||||
* ^
|
* ^
|
||||||
@ -422,12 +420,12 @@ static NOINLINE int process_timer_stats(void)
|
|||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
count = skip_whitespace(buf);
|
count = skip_whitespace(buf);
|
||||||
if (strcmp(strchrnul(count, ' '), " total events") == 0)
|
|
||||||
break;
|
|
||||||
p = strchr(count, ',');
|
p = strchr(count, ',');
|
||||||
if (!p)
|
if (!p)
|
||||||
continue;
|
continue;
|
||||||
*p++ = '\0';
|
*p++ = '\0';
|
||||||
|
if (strcmp(skip_non_whitespace(count), " total events") == 0)
|
||||||
|
break;
|
||||||
if (strchr(count, 'D'))
|
if (strchr(count, 'D'))
|
||||||
continue; /* deferred */
|
continue; /* deferred */
|
||||||
p = skip_whitespace(p); /* points to pid now */
|
p = skip_whitespace(p); /* points to pid now */
|
||||||
|
Loading…
Reference in New Issue
Block a user