函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\proc.c |
Create Date:2022-07-27 08:57:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:show_cpuinfo
函数原型:static int show_cpuinfo(struct seq_file *m, void *v)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct seq_file * | m | |
void * | v |
64 | seq_printf(m, "processor\t: %u\nvendor_id\t: %s\ncpu family\t: %d\nmodel\t\t: %u\nmodel name\t: %s\n", cpu, x86_vendor_id[0] ? x86_vendor_id : "unknown", CPU family , x86_model, x86_model_id[0] ? x86_model_id : "unknown") |
75 | 如果x86_stepping或Maximum supported CPUID level, -1=no CPUID: 大于等于0则seq_printf(m, "stepping\t: %d\n", x86_stepping) |
79 | 如果microcode则seq_printf(m, "microcode\t: 0x%x\n", microcode) |
82 | 如果cpu_has(c, Time Stamp Counter )则 |
83 | freq等于aperfmperf_get_khz(cpu) |
85 | 如果非freq则freq等于cpufreq_quick_get(cpu) |
89 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", freq / 1000, (freq % 1000)) |
94 | 如果 KB - valid for CPUS which support this call: 则seq_printf(m, "cache size\t: %u KB\n", KB - valid for CPUS which support this call: ) |
98 | show_cpuinfo_misc(m, c) |
101 | 以i小于32乘N 32-bit words worth of info 循环如果(cpu_has(c, i) && x86_cap_flags[i] != NULL)则 |
103 | seq_printf(m, " %s", x86_cap_flags[i]) |
106 | 以i小于32乘N 32-bit bug flags 循环 |
107 | bug_bit等于32乘N 32-bit words worth of info 加i |
113 | seq_printf(m, "\nbogomips\t: %lu.%02lu\n", loops_per_jiffy / (500000 / HZ), (loops_per_jiffy / (5000 / HZ)) % 100) |
118 | 如果Number of 4K pages in DTLB/ITLB combined(in pages): 大于0则seq_printf(m, "TLB size\t: %d 4K pages\n", Number of 4K pages in DTLB/ITLB combined(in pages): ) |
121 | seq_printf(m, "clflush size\t: %u\n", x86_clflush_size) |
122 | seq_printf(m, "cache_alignment\t: %d\n", In bytes ) |
123 | seq_printf(m, "address sizes\t: %u bits physical, %u bits virtual\n", x86_phys_bits, x86_virt_bits) |
129 | 如果i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(x86_power_flags)且x86_power_flags[i]则seq_printf(m, "%s%s", x86_power_flags[i][0] ? " " : "", x86_power_flags[i]) |
134 | 否则seq_printf(m, " [%d]", i) |
141 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |