turbostat.c (7293fccdffdec0ab0c36c4e4cffacb3ff114928e) | turbostat.c (0815a3d09baf2cd330f75020bdaad0f1adac0ecb) |
---|---|
1/* 2 * turbostat -- show CPU frequency and C-state residency 3 * on modern Intel turbo-capable processors. 4 * 5 * Copyright (c) 2013 Intel Corporation. 6 * Len Brown <len.brown@intel.com> 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 4511 unchanged lines hidden (view full) --- 4520 /* clear affinity side-effect of get_counters() */ 4521 sched_setaffinity(0, cpu_present_setsize, cpu_present_set); 4522 gettimeofday(&tv_even, (struct timezone *)NULL); 4523 4524 child_pid = fork(); 4525 if (!child_pid) { 4526 /* child */ 4527 execvp(argv[0], argv); | 1/* 2 * turbostat -- show CPU frequency and C-state residency 3 * on modern Intel turbo-capable processors. 4 * 5 * Copyright (c) 2013 Intel Corporation. 6 * Len Brown <len.brown@intel.com> 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 4511 unchanged lines hidden (view full) --- 4520 /* clear affinity side-effect of get_counters() */ 4521 sched_setaffinity(0, cpu_present_setsize, cpu_present_set); 4522 gettimeofday(&tv_even, (struct timezone *)NULL); 4523 4524 child_pid = fork(); 4525 if (!child_pid) { 4526 /* child */ 4527 execvp(argv[0], argv); |
4528 err(errno, "exec %s", argv[0]); |
|
4528 } else { 4529 4530 /* parent */ 4531 if (child_pid == -1) 4532 err(1, "fork"); 4533 4534 signal(SIGINT, SIG_IGN); 4535 signal(SIGQUIT, SIG_IGN); --- 540 unchanged lines hidden --- | 4529 } else { 4530 4531 /* parent */ 4532 if (child_pid == -1) 4533 err(1, "fork"); 4534 4535 signal(SIGINT, SIG_IGN); 4536 signal(SIGQUIT, SIG_IGN); --- 540 unchanged lines hidden --- |