函数逻辑报告 |
Source Code:kernel\events\core.c |
Create Date:2022-07-27 15:02:08 |
Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Inherit an event from parent task to child task.* Returns:* - valid pointer on success* - NULL for orphaned events* - IS_ERR() on error
函数原型:static struct perf_event *inherit_event(struct perf_event *parent_event, struct task_struct *parent, struct perf_event_context *parent_ctx, struct task_struct *child, struct perf_event *group_leader, struct perf_event_context *child_ctx)
返回类型:struct perf_event
参数:
类型 | 参数 | 名称 |
---|---|---|
struct perf_event * | parent_event | |
struct task_struct * | parent | |
struct perf_event_context * | parent_ctx | |
struct task_struct * | child | |
struct perf_event * | group_leader | |
struct perf_event_context * | child_ctx |
12067 | parent_state等于state |
12077 | 如果parent则parent_event等于parent |
12085 | 如果是错误则返回:child_event |
12089 | 如果attach_state按位与PERF_ATTACH_TASK_DATA且非pmu specific data 则 |
12093 | pmu specific data 等于分配内存并置零 |
12095 | 如果非pmu specific data 则 |
12107 | mutex_lock( & child_mutex) |
12108 | 如果is_orphaned_event(parent_event)或非atomic_long_inc_not_zero( & refcount)则 |
12113 | 返回:NULL |
12125 | 否则state等于PERF_EVENT_STATE_OFF |
12128 | 如果freq则 |
12129 | sample_period等于sample_period |
12132 | sample_period等于sample_period |
12133 | last_period等于sample_period |
12135 | local64_set( & period_left, sample_period) |
12139 | overflow_handler等于overflow_handler |
12152 | raw_spin_lock_irqsave( & Protect the states of the events in the list,* nr_active, and the list:, flags) |
12153 | add_event_to_ctx(child_event, child_ctx) |
12154 | raw_spin_unlock_irqrestore( & Protect the states of the events in the list,* nr_active, and the list:, flags) |
12159 | 添加链表项 |
12162 | 返回:child_event |
名称 | 描述 |
---|---|
inherit_group | Inherits an event group.* This will quietly suppress orphaned events; !inherit_event() is not an error.* This matches with perf_event_release_kernel() removing all child events.* Returns:* - 0 on success* - <0 on error |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |