| Function report | 
| Source Code: kernel\trace\ring_buffer.c | Create Date:2022-07-28 11:55:47 | 
| Last Modify:2020-03-17 19:30:04 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:We only allocate new buffers, never free them if the CPU goes down.* If we were to free the buffer, then the user would lose any trace that was in* the buffer.
Proto:int trace_rb_cpu_prepare(unsigned int cpu, struct hlist_node *node)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| unsigned int | cpu | |
| struct hlist_node * | node | 
| 4877 | If pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then Return 0 | 
| 4880 | nr_pages = 0 | 
| 4881 | nr_pages_same = 1 | 
| 4883 | for_each_buffer_cpu(buffer, cpu_i) | 
| 4888 | nr_pages_same = 0 | 
| 4889 | Break | 
| 4893 | If Not nr_pages_same Then nr_pages = 2 | 
| 4902 | smp_wmb() | 
| 4903 | pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer | 
| 4904 | Return 0 | 
| 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 |