Changeset bd01a4e in mainline
- Timestamp:
- 2010-04-18T17:41:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3bdf3d3
- Parents:
- 9e05055
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cpu.h
r9e05055 rbd01a4e 77 77 unsigned int id; 78 78 79 intactive;79 bool active; 80 80 int tlb_active; 81 81 -
kernel/generic/include/sysinfo/abi.h
r9e05055 rbd01a4e 66 66 typedef struct { 67 67 unsigned int id; /**< CPU ID as stored by kernel */ 68 bool active; /**< CPU is activate */ 68 69 uint16_t frequency_mhz; /**< Frequency in MHz */ 69 70 uint64_t idle_ticks; /**< Number of idle kernel quanta */ -
kernel/generic/src/sysinfo/stats.c
r9e05055 rbd01a4e 116 116 117 117 stats_cpus[i].id = cpus[i].id; 118 stats_cpus[i].active = cpus[i].active; 118 119 stats_cpus[i].frequency_mhz = cpus[i].frequency_mhz; 119 120 stats_cpus[i].busy_ticks = cpus[i].busy_ticks; -
uspace/app/tasks/tasks.c
r9e05055 rbd01a4e 164 164 size_t i; 165 165 for (i = 0; i < count; i++) { 166 printf("cpu%u: %" PRIu16 " MHz, busy ticks: " 167 "%" PRIu64 ", idle ticks: %" PRIu64 "\n", 168 cpus[i].id, cpus[i].frequency_mhz, cpus[i].busy_ticks, 169 cpus[i].idle_ticks); 166 if (cpus[i].active) { 167 printf("cpu%u: %" PRIu16 " MHz, busy ticks: " 168 "%" PRIu64 ", idle ticks: %" PRIu64 "\n", 169 cpus[i].id, cpus[i].frequency_mhz, cpus[i].busy_ticks, 170 cpus[i].idle_ticks); 171 } else { 172 printf("cpu%u: inactive\n", cpus[i].id); 173 } 170 174 } 171 175 -
uspace/app/top/screen.c
r9e05055 rbd01a4e 173 173 size_t i; 174 174 for (i = 0; i < data->cpus_count; i++) { 175 printf("cpu%u (%4" PRIu16 " MHz): busy ticks: " 176 "%" PRIu64 ", idle ticks: %" PRIu64, 177 data->cpus[i].id, data->cpus[i].frequency_mhz, 178 data->cpus[i].busy_ticks, data->cpus[i].idle_ticks); 179 printf(", idle: "); 180 print_float(data->cpus_perc[i].idle, 2); 181 printf("%%, busy: "); 182 print_float(data->cpus_perc[i].busy, 2); 183 184 printf("%%\n"); 175 if (data->cpus[i].active) { 176 printf("cpu%u (%4" PRIu16 " MHz): busy ticks: " 177 "%" PRIu64 ", idle ticks: %" PRIu64, 178 data->cpus[i].id, data->cpus[i].frequency_mhz, 179 data->cpus[i].busy_ticks, data->cpus[i].idle_ticks); 180 printf(", idle: "); 181 print_float(data->cpus_perc[i].idle, 2); 182 printf("%%, busy: "); 183 print_float(data->cpus_perc[i].busy, 2); 184 printf("%%\n"); 185 } else 186 printf("cpu%u inactive\n", data->cpus[i].id); 187 185 188 up_rows++; 186 189 }
Note:
See TracChangeset
for help on using the changeset viewer.