I am trying to print some function names and the CPU ID in which the function runs. Using linux-4.1 kernel
and when I print the CPU ID its always zero. I am using a dual core board. I just want to show that some kernel function can run in other CPU
also. Is there any way to switch the CPU and print the cpu id
as 1.
I am using armv7
board. Example:
0) 0.073 us | mutex_unlock();
3) 0.124 us | iov_iter_fault_in_readable();
1) 0.105 us | fget_light();
3) | ext3_write_begin() {
0) 0.071 us | put_pid();
3) | ext3_writepage_trans_blocks() {
3) 0.043 us | journal_blocks_per_page();
1) | sock_poll() {
0) 3.126 us | }
1) | unix_poll() {
3) 0.390 us | }
0) 6.007 us | }
3) | grab_cache_page_write_begin() {
1) | __pollwait() {
3) | find_lock_page() {
0) 0.077 us | fput();
3) 0.074 us | find_get_page();
1) | add_wait_queue() {
1) 0.081 us | _raw_spin_lock_irqsave();
As we can see in first column the number changes, how can I achieve that my modifying kernel source.