Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

95
Views
How to keep the default events when using `perf stat` with custom events

When the perf stat command is used, many default events are measured. For example, when I run perf stat ls, I obtain the following output:

Performance counter stats for 'ls':

              0,55 msec task-clock                #    0,598 CPUs utilized
                 0      context-switches          #    0,000 /sec
                 0      cpu-migrations            #    0,000 /sec
                99      page-faults               #  179,071 K/sec
         2 324 694      cycles                    #    4,205 GHz
         1 851 372      instructions              #    0,80  insn per cycle
           357 918      branches                  #  647,403 M/sec
            12 897      branch-misses             #    3,60% of all branches

       0,000923884 seconds time elapsed

       0,000993000 seconds user
       0,000000000 seconds sys

Now, let's suppose I also want to measure the cache-references and cache-misses events. If I run perf stat -e cache-references,cache-misses, the output is:

 Performance counter stats for 'ls':

           101 148      cache-references
            34 261      cache-misses              #   33,872 % of all cache refs

       0,000973384 seconds time elapsed

       0,001014000 seconds user
       0,000000000 seconds sys

Is there a way to add events with the -e flag, but also keep the default events shown when not using -e (without having to list all of them explicitly in the command) ?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!