Function report |
Source Code:kernel\events\core.c |
Create Date:2022-07-28 13:36:52 |
| Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:perf_output_sample
Proto:void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct perf_output_handle * | handle | |
| struct perf_event_header * | header | |
| struct perf_sample_data * | data | |
| struct perf_event * | event |
| 6563 | sample_type = type |
| 6565 | perf_output_put(handle, * header) |
| 6567 | If sample_type & PERF_SAMPLE_IDENTIFIER Then perf_output_put(handle, id) |
| 6570 | If sample_type & PERF_SAMPLE_IP Then perf_output_put(handle, ip) |
| 6573 | If sample_type & PERF_SAMPLE_TID Then perf_output_put(handle, tid_entry) |
| 6576 | If sample_type & PERF_SAMPLE_TIME Then perf_output_put(handle, time) |
| 6579 | If sample_type & PERF_SAMPLE_ADDR Then perf_output_put(handle, addr) |
| 6582 | If sample_type & PERF_SAMPLE_ID Then perf_output_put(handle, id) |
| 6585 | If sample_type & PERF_SAMPLE_STREAM_ID Then perf_output_put(handle, stream_id) |
| 6588 | If sample_type & PERF_SAMPLE_CPU Then perf_output_put(handle, cpu_entry) |
| 6591 | If sample_type & PERF_SAMPLE_PERIOD Then perf_output_put(handle, period) |
| 6597 | If sample_type & PERF_SAMPLE_CALLCHAIN Then |
| 6605 | If sample_type & PERF_SAMPLE_RAW Then |
| 6608 | If raw Then |
| 6611 | perf_output_put(handle, size) |
| 6612 | Do |
| 6613 | If copy Then |
| 6614 | __output_custom(handle, copy, data, size) |
| 6616 | Else |
| 6617 | __output_copy(handle, data, size) |
| 6620 | If perf_raw_frag_last(frag) Then Break |
| 6623 | When 1 cycle |
| 6624 | If pad Then __output_skip(handle, NULL, pad) |
| 6626 | Else |
| 6638 | If sample_type & PERF_SAMPLE_BRANCH_STACK Then |
| 6639 | If br_stack Then |
| 6642 | size = nr * sizeof(structperf_branch_entry) |
| 6645 | perf_output_put(handle, nr) |
| 6646 | perf_output_copy(handle, entries, size) |
| 6647 | Else |
| 6651 | nr = 0 |
| 6652 | perf_output_put(handle, nr) |
| 6656 | If sample_type & PERF_SAMPLE_REGS_USER Then |
| 6663 | perf_output_put(handle, abi) |
| 6665 | If abi Then |
| 6666 | mask = sample_regs_user |
| 6667 | perf_output_sample_regs(handle, regs, mask) |
| 6673 | If sample_type & PERF_SAMPLE_STACK_USER Then |
| 6679 | If sample_type & PERF_SAMPLE_WEIGHT Then perf_output_put(handle, weight) |
| 6682 | If sample_type & PERF_SAMPLE_DATA_SRC Then perf_output_put(handle, val) |
| 6685 | If sample_type & PERF_SAMPLE_TRANSACTION Then perf_output_put(handle, txn) |
| 6688 | If sample_type & PERF_SAMPLE_REGS_INTR Then |
| 6694 | perf_output_put(handle, abi) |
| 6696 | If abi Then |
| 6697 | mask = sample_regs_intr |
| 6699 | perf_output_sample_regs(handle, regs, mask) |
| 6705 | If sample_type & PERF_SAMPLE_PHYS_ADDR Then perf_output_put(handle, phys_addr) |
| 6708 | If sample_type & PERF_SAMPLE_AUX Then |
| 6709 | perf_output_put(handle, aux_size) |
| 6711 | If aux_size Then perf_aux_sample_output(event, handle, data) |
| 6715 | If Not watermark Then |
| 6716 | wakeup_events = wakeup_events |
| 6718 | If wakeup_events Then |
| 6720 | events = local_inc_return( & event limit ) |
| 6722 | If events >= wakeup_events Then |
| 6723 | local_sub(wakeup_events, & event limit ) |
| 6724 | local_inc( & wakeup stamp ) |
| Name | Describe |
|---|---|
| __perf_event_output |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |