GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Broken (?) raw pmu support · Issue #734 · async-profiler/async-profiler

Broken (?) raw pmu support #734

New issue
Copy link
New issue
Copy link
Closed
Closed
Broken (?) raw pmu support#734
Copy link

Description

@RainM
RainM
opened on Mar 26, 2023
Issue body actions

Hi!

Just tried raw PMU encoding with async-profiler. Tried different options (see below) but nothing works except 'rXXX' encoding.

# ./profiler.sh  -e pmu/cpu/umask=0x1,event=0xd3/ -d 30  -t  7
[ERROR] Duplicate event argument

# ./profiler.sh  -e pmu/umask=0x1,event=0xd3/ -d 30  -t  7
[ERROR] Duplicate event argument

# ./profiler.sh  -e r1d3 -d 30  -t  7
.....
Works!

looks like a problem here with ',event'. Something treats it as argment (now sure how it works).

So, the question is how to encode raw events from perf-list output to asyn-profiler. Example:

mem_load_uops_l3_hit_retired.xsnp_hitm
        cpu/umask=0x4,(null)=0x4e2b,event=0xd2/  

mem_trans_retired.load_latency_gt_128
        cpu/umask=0x1,(null)=0x3f1,event=0xcd,ldlat=0x80/

How should I encode these events to asyn-profiler? What is '(null)' ? Should I skip this?

--Sergey

Activity

  1. apangin commented on Mar 26, 2023

    @apangin
    apangin
    on Mar 26, 2023
    Collaborator
    More actions

    , is treated as an argument delimiter in the agent command line and cannot appear anywhere in the value string.
    For PMU event descriptor, you can replace it with :
    Here is the correct format:

    -e pmu/umask=0x1:event=0xd3/
    

    I will change asprof launcher to replace , with : in the PMU event descriptor automatically.

    I have no idea about (null) in perf-list output; seems like a perf bug. I'd suggest to consult CPU architecture reference for the correct configuration of PMU events.

  2. RainM commented on Mar 26, 2023

    @RainM
    RainM
    on Mar 26, 2023
    Author
    More actions

    Tried with proper delimiter. Does not work:

     # ./profiler.sh  -e pmu/umask=0x1:event=0xd3/  -d 60  -t  7.   << copy-pasted your example
    [ERROR] Unsupported event type
    
    ./profiler.sh  -e r1d3  -d 60  -t  7 -f 1
    Profiling for 60 seconds                         <<< plain raw encoding works
    .....
    
    # ./profiler.sh  -e pmu/umask=0x20:event=0xd1/  -d 60  -t  7 << another event
    [ERROR] Unsupported event type
    
    # ./profiler.sh  -e r20d1  -d 60  -t  7 -f 1
    Profiling for 60 seconds
    .....
    
  3. apangin
    added 2 commits that reference this issue on Mar 28, 2023

    #734: Raw PMU event descriptors

    b93092f

    #734: Raw PMU event descriptors

    578e3a1
  4. apangin commented on Mar 28, 2023

    @apangin
    apangin
    on Mar 28, 2023
    Collaborator
    More actions

    Sorry for the confusion, I meant -e cpu/umask=0x1:event=0xd3/

    I also added the possibility to specify an event descriptor in perf format (with comma):
    -e cpu/umask=0x1,event=0xd3/

  5. apangin commented on Mar 30, 2023

    @apangin
    apangin
    on Mar 30, 2023
    Collaborator
    More actions

    I'm closing the issue, since the question is answered and the bug with "," in the event name is fixed.
    Feel free to reopen if you have further comments.

    Reacted by Sergey Melnikov
  6. apangin
    closed this as completedon Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.