Thread: tracking performance, actual cache hits/misses, page hits/misses

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    1

    tracking performance, actual cache hits/misses, page hits/misses

    I am writing a calculation intensive program in C (Linux OS, specifically Fedora 11) and was wondering if there is a way to track cache hits/misses and page hits/misses?

    And more generally I'm looking for a way to track anything that could be of use in analysis of performance on different machines, is there a way to do this in the C program itself or a utility already out there that can do this?

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    The sar and vmstat utilities come to mind; however since Linux is open source there probably are many interfaces to the kernel that can be invoked to get at that information. I only work in Unix but there are many Linux folks in this forum and I'm sure they can provide better answers.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    1,012
    If it supports your CPU, look at valgrind. Its cachegrind tool will do some of what you want. callgrind (an extended version of cachegrind) + the KCachegrind front end is an especially useful way to do profiling.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Resource manager tree
    By VirtualAce in forum Game Programming
    Replies: 23
    Last Post: 09-07-2007, 10:27 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM