Hello.
My name is youngjae
I am enabling coresight to gather perf information through coresight.
I have some techincal problem.
I need a help.
My device has Kernel version - 4.9.39
I did it as below.
 1.    I cloned 4.9 version in Linaro opencsd git      git clone https://github.com/Linaro/OpenCSD.git      git checkout origin/perf-opencsd-4.9   2.    I complied perf tool using NDK   3.    After pushing the perf tool into the device, I obtained perf.data  echo 1 > /sys/devices/platform/1e005000.etf1/1e005000.etf1/enable_sink  ./perf record -e cs_etm/timestamp,cycacc,@1e005000.etf1/u -C 0-3 -o perf_etf1.data --per-thread taskset f uname    echo 1 > /sys/devices/platform/1e004000.etf0/1e004000.etf0/enable_sink  ./perf record -e cs_etm/timestamp,cycacc,@1e004000.etf0/u -C 4-7 -o perf_etf0.data --per-thread taskset f0 uname    4. I compiled openCSD library and off target perf tool.   5. I saw CoreSight ETM Trace data using perf report . ... CoreSight ETM Trace data: size 2560 bytes   6. I injected it as below ./perf inject --I perf_etf1.data --o inj_etf1.data --itrace=il64 –strip => Success. But, after executing perf report, I got below error.  Error:   After compling higher perf tool - v4.12, I checked below fact. It shows nr of branch stack is 0. 0 18446744073709551615 0x99658 [0x38]: PERF_RECORD_SAMPLE(IP, 0x2): -1/-1: 0 period: 0 addr: 0   I don't know what the reason is.  Could you help me?  etm configuration problem?   ./perf inject --I perf_etf0.data --o inj_etf0.data --itrace=il64 –strip => Fail. I checked the problem. TRCIDR8 of ETM of core4 ~ core7 is 6. This means max speculation depth. OpenCSD doesn't support max speculation depth.  So, we cannot use ETM of core4 ~ core7. Do you know when openCSD support max speculation depth? If openCSD cannot support max speculation depth, we cannot gather etm information of core4 ~ core7.
 
 
 
 
 
 
  0: I_ASYNC : Alignment Synchronisation.
  12: I_TRACE_INFO : Trace Info.; INFO=0x0
  17: I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFFF8008961430; 
  26: I_ASYNC : Alignment Synchronisation.
  40: I_TRACE_INFO : Trace Info.; INFO=0x0
  43: I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFFF8008961904;  
 
 
 
 
Selected -b but no branch data. Did you call perf record without -b?
# To display the perf.data header info, please use --header/--header-only options.
 
 
... branch stack: nr:0
 ... thread: :-1:-1
 ...... dso: <not found> 
My question is two.
1. What should I do to get nr of branch stack?
2. Who knows when openCSD will support max speculation depth?
Thank you.
Best Regards
Youngjae.
* etm information
0x1a8 [0x148]: PERF_RECORD_AUXTRACE_INFO type: 3
   Header version                 0
   PMU type/num cpus              30064771076
   Snapshot                       0
   Magic number                   4629771061636907072
   CPU                            0
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    16
   TRCIDR0                        671092385
   TRCIDR1                        1090581536
   TRCIDR2                        536875144
   TRCIDR8                        0
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            1
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    18
   TRCIDR0                        671092385
   TRCIDR1                        1090581536
   TRCIDR2                        536875144
   TRCIDR8                        0
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            2
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    20
   TRCIDR0                        671092385
   TRCIDR1                        1090581536
   TRCIDR2                        536875144
   TRCIDR8                        0
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            3
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    22
   TRCIDR0                        671092385
   TRCIDR1                        1090581536
   TRCIDR2                        536875144
   TRCIDR8                        0
   TRCAUTHSTATUS                  204
   Header version                 0
   PMU type/num cpus              30064771076
   Snapshot                       0
   Magic number                   4629771061636907072
   CPU                            4
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    24
   TRCIDR0                        134220961
   TRCIDR1                        1392571392
   TRCIDR2                        268436616
   TRCIDR8                        6
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            5
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    26
   TRCIDR0                        134220961
   TRCIDR1                        1392571392
   TRCIDR2                        268436616
   TRCIDR8                        6
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            6
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    28
   TRCIDR0                        134220961
   TRCIDR1                        1392571392
   TRCIDR2                        268436616
   TRCIDR8                        6
   TRCAUTHSTATUS                  204
   Magic number                   4629771061636907072
   CPU                            7
   TRCCONFIGR                     268439552
   TRCTRACEIDR                    30
   TRCIDR0                        134220961
   TRCIDR1                        1392571392
   TRCIDR2                        268436616
   TRCIDR8                        6
   TRCAUTHSTATUS                  204
perf report --dump --stdio
. ... CoreSight ETM Trace data: size 2560 bytes
  0: I_ASYNC : Alignment Synchronisation.
  12: I_TRACE_INFO : Trace Info.; INFO=0x0
  17: I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFFF8008961430; 
  26: I_ASYNC : Alignment Synchronisation.
  40: I_TRACE_INFO : Trace Info.; INFO=0x0
  43: I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFFF8008961904; 
  52: I_ATOM_F3 : Atom format 3.; NEN
  53: I_ATOM_F3 : Atom format 3.; NNE
  54: I_ATOM_F3 : Atom format 3.; NNN
  55: I_ATOM_F3 : Atom format 3.; ENN
  56: I_ATOM_F5 : Atom format 5.; NENEN
  57: I_ATOM_F5 : Atom format 5.; ENENE
  58: I_ATOM_F5 : Atom format 5.; NENEN
  59: I_ATOM_F5 : Atom format 5.; ENENE
  60: I_ATOM_F3 : Atom format 3.; NEN
  64: I_ATOM_F3 : Atom format 3.; NNE
  65: I_ATOM_F3 : Atom format 3.; NNN
  66: I_ATOM_F3 : Atom format 3.; ENN
  67: I_ATOM_F3 : Atom format 3.; NEN
  68: I_ATOM_F3 : Atom format 3.; NNE
  69: I_ATOM_F5 : Atom format 5.; NENEN
  70: I_ATOM_F3 : Atom format 3.; NNE
  71: I_ATOM_F5 : Atom format 5.; NENEN
  72: I_ATOM_F5 : Atom format 5.; ENENE
  73: I_ATOM_F5 : Atom format 5.; NENEN
  74: I_ATOM_F5 : Atom format 5.; ENENE
  75: I_ATOM_F5 : Atom format 5.; NENEN
  76: I_ATOM_F5 : Atom format 5.; ENENE
  77: I_ATOM_F3 : Atom format 3.; NEN
  78: I_ATOM_F3 : Atom format 3.; NNE
  80: I_ATOM_F5 : Atom format 5.; NENEN
  81: I_ATOM_F5 : Atom format 5.; ENENE
  82: I_ATOM_F5 : Atom format 5.; NENEN
  83: I_ATOM_F5 : Atom format 5.; ENENE
  84: I_ATOM_F5 : Atom format 5.; NENEN
  85: I_ATOM_F5 : Atom format 5.; ENENE
  86: I_ATOM_F5 : Atom format 5.; NENEN
  87: I_ATOM_F3 : Atom format 3.; NNE
  88: I_ATOM_F5 : Atom format 5.; NENEN
  89: I_ATOM_F5 : Atom format 5.; ENENE
  90: I_ATOM_F3 : Atom format 3.; NEN
  91: I_ATOM_F3 : Atom format 3.; NNE
  92: I_ATOM_F5 : Atom format 5.; NENEN
  93: I_ATOM_F5 : Atom format 5.; ENENE
  94: I_ATOM_F3 : Atom format 3.; NEN
  96: I_ATOM_F3 : Atom format 3.; NNE
  97: I_ATOM_F3 : Atom format 3.; NEN
  98: I_ATOM_F3 : Atom format 3.; NNE
  99: I_ATOM_F3 : Atom format 3.; NEE
  100: I_ATOM_F4 : Atom format 4.; NNNN
  101: I_ATOM_F6 : Atom format 6.; EEEN
  102: I_ATOM_F3 : Atom format 3.; NNE
  103: I_ATOM_F1 : Atom format 1.; E
  104: I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x00000076F64A1B50; 
  114: I_ATOM_F2 : Atom format 2.; EE
  115: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF65EE2C0; 
  120: I_ATOM_F2 : Atom format 2.; NE
  121: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF67DD370; 
  126: I_ATOM_F2 : Atom format 2.; NE
  128: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF67DD390 ~[0x190]
  130: I_ATOM_F3 : Atom format 3.; ENN
  131: I_ATOM_F2 : Atom format 2.; NE
  132: I_TIMESTAMP : Timestamp.; Updated val = 0xf6000
  136: I_ATOM_F1 : Atom format 1.; E
  137: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF64A1B94; 
  142: I_ATOM_F2 : Atom format 2.; EE
  144: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF66430C0; 
  149: I_ATOM_F2 : Atom format 2.; EE
  150: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF663F5A0; 
  155: I_ATOM_F3 : Atom format 3.; NNN
  156: I_ATOM_F1 : Atom format 1.; E
  157: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF66430E4; 
  163: I_ATOM_F3 : Atom format 3.; EEE
  164: I_ATOM_F1 : Atom format 1.; E
  165: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF663BE00; 
  170: I_ATOM_F3 : Atom format 3.; EEN
  171: I_ATOM_F3 : Atom format 3.; EEN
  172: I_ATOM_F4 : Atom format 4.; NNNN
  173: I_ATOM_F3 : Atom format 3.; EEN
  174: I_ATOM_F3 : Atom format 3.; NEE
  176: I_ATOM_F3 : Atom format 3.; NNE
  177: I_ATOM_F3 : Atom format 3.; ENN
  178: I_ATOM_F3 : Atom format 3.; EEN
  179: I_ATOM_F3 : Atom format 3.; NEE
  180: I_ATOM_F3 : Atom format 3.; NNE
  181: I_ATOM_F3 : Atom format 3.; ENN
  182: I_ATOM_F3 : Atom format 3.; EEN
  183: I_ATOM_F3 : Atom format 3.; NEE
  184: I_ATOM_F3 : Atom format 3.; NNE
  185: I_ATOM_F3 : Atom format 3.; ENN
  186: I_ATOM_F3 : Atom format 3.; EEN
  187: I_ATOM_F3 : Atom format 3.; NEE
  188: I_ATOM_F3 : Atom format 3.; NNE
  189: I_ATOM_F3 : Atom format 3.; ENN
  192: I_ATOM_F3 : Atom format 3.; EEN
  193: I_ATOM_F3 : Atom format 3.; NEE
  194: I_ATOM_F3 : Atom format 3.; NNE
  195: I_ATOM_F3 : Atom format 3.; ENN
  196: I_ATOM_F3 : Atom format 3.; ENE
  197: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF6642AF8; 
  202: I_ATOM_F3 : Atom format 3.; EEE
  203: I_ATOM_F1 : Atom format 1.; E
  204: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF65FFA40; 
  210: I_ATOM_F2 : Atom format 2.; EE
  211: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF6642B58; 
  216: I_ATOM_F3 : Atom format 3.; ENE
  217: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF6643100 ~[0x3100]
  220: I_ATOM_F3 : Atom format 3.; ENE
  221: I_ATOM_F5 : Atom format 5.; ENENE
  222: I_ATOM_F3 : Atom format 3.; EEN
  224: I_ATOM_F3 : Atom format 3.; EEN
  225: I_ATOM_F6 : Atom format 6.; EEEEN
  226: I_ATOM_F3 : Atom format 3.; ENN
  227: I_ATOM_F3 : Atom format 3.; NEE
  228: I_ATOM_F2 : Atom format 2.; NE
  229: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF66456D4 ~[0x56D4]
  232: I_ATOM_F3 : Atom format 3.; ENE
  233: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF66456E0 ~[0xE0]
  235: I_ATOM_F3 : Atom format 3.; NEN
  236: I_ATOM_F3 : Atom format 3.; NNE
  237: I_ATOM_F3 : Atom format 3.; ENE
  238: I_ADDR_MATCH : Exact Address Match., [1]
  240: I_ATOM_F3 : Atom format 3.; ENE
  241: I_ADDR_MATCH : Exact Address Match., [1]
  242: I_ATOM_F3 : Atom format 3.; NNE
  243: I_ATOM_F5 : Atom format 5.; ENENE
  244: I_ATOM_F3 : Atom format 3.; ENE
  245: I_ATOM_F3 : Atom format 3.; ENN
  246: I_ATOM_F3 : Atom format 3.; EEN
  247: I_ATOM_F1 : Atom format 1.; E
  248: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF6645B40 ~[0x5B40]
  251: I_ATOM_F5 : Atom format 5.; NEEEE
  252: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF6642F84 ~[0x2F84]
  256: I_ATOM_F4 : Atom format 4.; NNNN
  257: I_ATOM_F1 : Atom format 1.; E
  258: I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xF6643118 ~[0x3118]
  261: I_ATOM_F2 : Atom format 2.; EE
  262: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF663F960; 
  267: I_ATOM_F3 : Atom format 3.; NNE
  268: I_ATOM_F1 : Atom format 1.; E
  269: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF6643128; 
  275: I_ATOM_F1 : Atom format 1.; E
  276: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF64A1BB8; 
  281: I_ATOM_F2 : Atom format 2.; EE
  282: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF65EF290; 
  288: I_ATOM_F3 : Atom format 3.; NNE
  289: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF64A1BC4; 
  294: I_ATOM_F2 : Atom format 2.; EE
  295: I_ADDR_L_32IS0 : Address, Long, 32 bit, IS0.; Addr=0xF65EF164; 
  | 
  |