Profiling Our Operating Systems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Slasher

Profiling Our Operating Systems

Post by Slasher »

Hi,
After a Long time trying to patch up my Os (I was just adding more stuff to a poor design :P ) I decided to restart afresh.
My question is, how can we compare the performance gain or loss incurred due to changes in code and design?
I'm looking for a means to measure and time my OS.
e.g
I'm changing my kernel memory allocator from using link list of allocation nodes to a table of allocation slots. Wanted to see if the change lead to performance gains or losses.
Any ideas are welcomed, thanks
;D
proxy

Re:Profiling Our Operating Systems

Post by proxy »

one simple way it to setup a high resolution timer in kernel land. Then you cna get some raw numbers like this:

Code: Select all

uint64_t t1 = getTickCount();

// code in question here

uint64_t t2 = getTickCount();

printf("it took this many ticks: %ld\n" t2 - t1);
that's the simplest way to get some actual quantitative results.

proxy
tom1000000

Re:Profiling Our Operating Systems

Post by tom1000000 »

The only proper way would be to write some user mode applications and run them. Preferably ensure your command line allows multiple programs to be executed at the same time.
Post Reply