2016-04-27 5 views
1

Le perf fonctionnait correctement sur mon Chromebook Cortex-A15 exécutant ARCH Linux ARM."perf stat" renvoyant <non pris en charge> pour tous les événements sur ARCH Linux ARM

J'ai mis à jour pacman pour obtenir gcc-5.3, et il m'a demandé de mettre à jour mon noyau, ce que j'ai fait.

Maintenant perf retours:

[[email protected] Speckle]$ perf stat uname -a 
Linux alarm 3.8.11-3-ARCH #1 SMP Wed Jan 20 13:44:59 MST 2016 armv7l GNU/Linux 

Performance counter stats for 'uname -a': 

    <not supported>  task-clock    
    <not supported>  context-switches   
    <not supported>  cpu-migrations   
    <not supported>  page-faults    
    <not supported>  cycles     
    <not supported>  stalled-cycles-frontend 
    <not supported>  stalled-cycles-backend 
    <not supported>  instructions    
    <not supported>  branches     
    <not supported>  branch-misses    

     0.002148765 seconds time elapsed 

Si je cours perf list, il me dit qu'il devraient appuyer ces événements:

[[email protected] Speckle]$ perf list 

List of pre-defined events (to be used in -e): 

    branch-instructions OR branches     [Hardware event] 
    branch-misses          [Hardware event] 
    bus-cycles           [Hardware event] 
    cache-misses          [Hardware event] 
    cache-references         [Hardware event] 
    cpu-cycles OR cycles        [Hardware event] 
    instructions          [Hardware event] 
    ref-cycles           [Hardware event] 

Et vérifier ma configuration du noyau, il semble que perf devrait encore prise en charge.

[[email protected] Speckle]$ zgrep PERF /proc/config.gz 
CONFIG_CGROUP_PERF=y 
CONFIG_HAVE_PERF_EVENTS=y 
CONFIG_PERF_USE_VMALLOC=y 
CONFIG_PERF_EVENTS=y 
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set 
CONFIG_HW_PERF_EVENTS=y 
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set 
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 
# CONFIG_CLS_U32_PERF is not set 
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set 

Si je tente ocount/oprofile, il semble fonctionner:

[[email protected] ~]$ ocount --events INST_RETIRED uname -a 
Linux alarm 3.8.11-3-ARCH #1 SMP Wed Jan 20 13:44:59 MST 2016 armv7l GNU/Linux 

Events were actively counted for 1598252 nanoseconds. 
Event counts (actual) for /usr/bin/uname: 
    Event    Count     % time counted 
    INST_RETIRED   609,518     100.00 

En regardant cela ressemble le journal de pacman, c'est là le changement du noyau a eu lieu?

[2016-04-26 06:24] [ALPM] upgraded libtool (2.4.6-3 -> 2.4.6-4) 
[2016-04-26 06:27] [ALPM] upgraded linux-firmware (20150904.6ebf5d5-1 -> 20160315.deb1d83-1) 
[2016-04-26 06:27] [ALPM] upgraded linux-peach (3.8.11-2 -> 3.8.11-3) 
[2016-04-26 06:27] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ... 
[2016-04-26 06:27] [ALPM-SCRIPTLET] A new kernel version needs to be flashed onto /dev/sda1. 
[2016-04-26 06:27] [ALPM-SCRIPTLET] Do you want to do this now? [y|N] 
[2016-04-26 06:28] [ALPM-SCRIPTLET] 8752+0 records in 
[2016-04-26 06:28] [ALPM-SCRIPTLET] 8752+0 records out 
[2016-04-26 06:28] [ALPM-SCRIPTLET] 4481024 bytes (4.5 MB, 4.3 MiB) copied, 12.7236 s, 352 kB/s 

Qu'est-ce que je visse et comment puis-je perf retour?

+0

Pouvez-vous utiliser directement les événements 'raw'? Cela fonctionne-t-il sur ['oprofile'] (http://oprofile.sourceforge.net/docs/armv7-ca15-events.php)? Quelles sont vos versions 'kernel' et' perf'? – Jakuje

+0

La version du noyau est 'l'alarme Linux 3.8.11-3-ARCH'. En vérifiant 'pacman -Q', j'ai installé' linux-api-headers 4.4.1-1', 'linux-firmware 20160315.deb1d83-1', et' perf 4.5-2'. Je ne suis pas familier avec 'oprof',' oreport', mais il semble qu'il a couru sans erreur. Les évènements bruts ne semblent pas compter, si j'ai les chiffres corrects ('' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ' – Chris

+0

Existe-t-il une commande facile à utiliser avec 'oprof' pour vérifier que cela fonctionne? Si je fais 'sudo operf ls', il est dit que le profilage du noyau n'est pas possible avec la configuration système actuelle. – Chris

Répondre

0

La solution que j'ai trouvée consistait à rétrograder de perf 4.5-2 à perf 4.3-1.

cd /var/cache/pacman/pkg/ 
sudo pacman -U perf-4.3-1-armv7h.pkg.tar.xz 

Courir perf stat ls retourne maintenant les compteurs je pense.