函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\mce\therm_throt.c |
Create Date:2022-07-27 09:04:29 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:throttle_active_work
函数原型:static void __maybe_unused throttle_active_work(struct work_struct *work)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct work_struct * | work |
| 243 | now等于get_jiffies_64() |
| 247 | get_therm_status(level, & hot, & temp) |
| 249 | 如果非hot且temp大于baseline_temp则 |
| 250 | 如果rate_control_active则打印信息("CPU%d: %s temperature/speed normal (total events = %lu)\n", this_cpu, level == CORE_LEVEL ? "Core" : "Package", count) |
| 256 | rate_control_active = false |
| 257 | 返回 |
| 260 | 如果time_before64(now, next_check)且rate_control_active则转到:re_arm |
| 266 | 如果count不等于last_count则 |
| 274 | temp_samples[sample_index]等于temp |
| 275 | sample_count自加 |
| 276 | sample_index等于sample_index加1的和取模ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) |
| 277 | 如果sample_count小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples)则转到:re_arm |
| 280 | avg等于0 |
| 281 | 以i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples)循环avg加等于temp_samples[i] |
| 284 | avg除等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) |
| 287 | 打印警告信息("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n", this_cpu, level == CORE_LEVEL ? "Core" : "Package", count) |
| 291 | rate_control_active = true |
| 296 | re_arm : |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |