Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Kernel Module Time measuring

$
0
0

I am trying to make a kernel module based on linked list and I want to measure the execution time of insertion of 1000 items into the list.

What header file and what function should I use to measure the starting time and the end time?

    // start clock here    for(i = 0; i < 1000; i++)    {          struct my_node* new = kmalloc(sizeof(struct my_node), GFP_KERNEL);         new->data = i;         list_add(&new->entry, &my_list);    }    // end clock here    // print out the execution time in seconds here

Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>