turbostat.c (15423b958f33132152e209e98df0dedc7a78f22c) | turbostat.c (605736c6929d541c78a85dffae4d33a23b6b2149) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * turbostat -- show CPU frequency and C-state residency 4 * on modern Intel and AMD processors. 5 * 6 * Copyright (c) 2013 Intel Corporation. 7 * Len Brown <len.brown@intel.com> 8 */ --- 2904 unchanged lines hidden (view full) --- 2913 int retval; 2914 2915 fp = fopen_or_die("/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us", "r"); 2916 2917 retval = fscanf(fp, "%lld", &cpuidle_cur_cpu_lpi_us); 2918 if (retval != 1) { 2919 fprintf(stderr, "Disabling Low Power Idle CPU output\n"); 2920 BIC_NOT_PRESENT(BIC_CPU_LPI); | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * turbostat -- show CPU frequency and C-state residency 4 * on modern Intel and AMD processors. 5 * 6 * Copyright (c) 2013 Intel Corporation. 7 * Len Brown <len.brown@intel.com> 8 */ --- 2904 unchanged lines hidden (view full) --- 2913 int retval; 2914 2915 fp = fopen_or_die("/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us", "r"); 2916 2917 retval = fscanf(fp, "%lld", &cpuidle_cur_cpu_lpi_us); 2918 if (retval != 1) { 2919 fprintf(stderr, "Disabling Low Power Idle CPU output\n"); 2920 BIC_NOT_PRESENT(BIC_CPU_LPI); |
2921 fclose(fp); |
|
2921 return -1; 2922 } 2923 2924 fclose(fp); 2925 2926 return 0; 2927} 2928/* --- 2838 unchanged lines hidden --- | 2922 return -1; 2923 } 2924 2925 fclose(fp); 2926 2927 return 0; 2928} 2929/* --- 2838 unchanged lines hidden --- |