Function report |
Source Code:kernel\profile.c |
Create Date:2022-07-28 10:37:44 |
| Last Modify:2020-03-17 15:11:09 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function accesses profiling information. The returned data is* binary: the sampling step and the actual contents of the profile* buffer. Use of the program readprofile is recommended in order to* get meaningful info out of these data.
Proto:static ssize_t read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| char __user * | buf | |
| size_t | count | |
| loff_t * | ppos |
| 471 | sample_step = 1 << prof_shift |
| 473 | profile_flip_buffers() |
| 476 | If count > (prof_len + 1) * sizeof(unsignedint) - p Then count = (prof_len + 1) * sizeof(unsignedint) - p |
| 478 | read = 0 |
| 481 | If Write a simple value into user space( * ((char * )( & sample_step) + p), buf) Then Return -EFAULT |
| 483 | buf++ |
| 483 | p++ |
| 483 | count-- |
| 483 | read++ |
| 485 | pnt = prof_buffer + p - sizeof(atomic_t) |
| 486 | If copy_to_user(buf, (void * )pnt, count) Then Return -EFAULT |
| 490 | Return read |
| 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 |