Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8589333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:01:47+00:00 2026-06-11T23:01:47+00:00

I need to write a C program (for a school assignment to determine cache

  • 0

I need to write a C program (for a school assignment to determine cache size). I have used clock() as a means of getting timing info. But was told that might lead to inaccurate results.

So I was thinking of using other libraries, introduced in recent labs, perf or papi, to record performance. But the way we used them was via command line:

perf stat ./test 

I think its possible to use perf in the app? I am new to C, more used to higher level languages like Python/JS/Java etc. So I think I need to create a make file, include the library etc. Also what functions do I have?

I saw http://www.rzg.mpg.de/computing/hardware/BGP/perf.html

libperf.a
    perf library for MPI programs.
libperfhpm.a
    Use perf instrumentation to call hpmtoolkit.
libperfdummy.a
    Provides dummies for the perf instrumentation. You can link against this library to avoid the perf overhead in production runs.

Which do I use? Its not a MPI program. Then how do I use it actually? I am using C and gcc. This looks like compilation but … whats mpixlf90

mpixlf90_r -o tperf tperf.f -L/usr/local/lib -lperf
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:01:49+00:00Added an answer on June 11, 2026 at 11:01 pm

    There are lots of performance analysis tools (which provide information about running time, memory consumption) for C and C++ programs, some of which are,

    1. Valgrind

    2. Google Perf Tools

    Hope this is what you are looking for!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a program used internally where different users will have different
I need to write a program to implement real time clock for ARM architecture.
I have been given a project where i need to write a program which
I need to write a program that prints 0.(03) for input 1 and 33.
I need to write a program that takes input line at a time and
i need to write a program in c# to collect information about processes running
I need to write a program that uses matrix multiplication to rotate an image
I need to write this program using a loop https://i.stack.imgur.com/gko6T.jpg this is what i
I'm going to need to write a program that takes a list of persons
I need to write one java program which monitors a folder containing excel sheets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.