Hi All,
Linux h/w trace decoding is working as expected but user-space trace decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
1) Kernel trace => perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home) => perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k' # Event count (approx.): 937 # # Children Self Command Shared Object Symbol # ........ ........ ....... ................. .............................................. # 15.58% 15.58% swapper [kernel.kallsyms] [k] __delay 8.54% 8.54% swapper [kernel.kallsyms] [k] arch_counter_get_cntpct 3.31% 3.31% swapper [kernel.kallsyms] [k] event_sched_in.isra.37 2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in 2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle 2.35% 2.35% swapper [kernel.kallsyms] [k] perf_event_update_userpage 2.24% 2.24% swapper [kernel.kallsyms] [k] clocks_calc_mult_shift
2) User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home) => perf report Error: The perf.data data has no samples! # To display the perf.data header info, please use --header/--header-only options. # But if dump raw trace then I can see ISYNC/ATOM packets
=> perf report --dump . ... CoreSight ETM Trace data: size 25960 bytes Idx:24; ID:12; I_ASYNC : Alignment Synchronisation. Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0 Idx:39; ID:12; I_TRACE_ON : Trace On. Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL2, NS; CID=0x00000000; Idx:46; ID:12; I_TRACE_ON : Trace On. Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL0, NS; CID=0x00000000; Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x0000FFFF801CCF7C; Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val = 0xede4824ce5 . . .
Any idea what I am missing.
Thanks -Bharat
Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
Kernel trace => perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home) => perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k' # Event count (approx.): 937 # # Children Self Command Shared Object Symbol # ........ ........ ....... ................. .............................................. # 15.58% 15.58% swapper [kernel.kallsyms] [k] __delay 8.54% 8.54% swapper [kernel.kallsyms] [k] arch_counter_get_cntpct 3.31% 3.31% swapper [kernel.kallsyms] [k] event_sched_in.isra.37 2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in 2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle 2.35% 2.35% swapper [kernel.kallsyms] [k] perf_event_update_userpage 2.24% 2.24% swapper [kernel.kallsyms] [k] clocks_calc_mult_shift
User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home) => perf report Error: The perf.data data has no samples! # To display the perf.data header info, please use --header/--header-only options. # But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks, Leo Yan
=> perf report --dump . ... CoreSight ETM Trace data: size 25960 bytes Idx:24; ID:12; I_ASYNC : Alignment Synchronisation. Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0 Idx:39; ID:12; I_TRACE_ON : Trace On. Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL2, NS; CID=0x00000000; Idx:46; ID:12; I_TRACE_ON : Trace On. Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL0, NS; CID=0x00000000; Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x0000FFFF801CCF7C; Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val = 0xede4824ce5 . . .
Any idea what I am missing.
Thanks -Bharat _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Hello,
Below is output of "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2 but it adds "Ignore Packet - 0x70". Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe I missed something.
========== build id event received for [kernel.kallsyms]: a53ffb318c6af988d2225fdac015fb4ba3e2e34d build id event received for /usr/lib/systemd/systemd: 16460ffcbc368221e1e71c587c059a44497eb3de build id event received for /usr/lib/aarch64-linux-gnu/libudev.so.1.6.12: bf0152a1c65039afe462800eb834190830a5c8d2 build id event received for /usr/lib/aarch64-linux-gnu/libgpg-error.so.0.26.1: c6cdc565ba277d464ff4a9ad3efb59703b51d5ca build id event received for /usr/lib/aarch64-linux-gnu/libjson-c.so.3.0.1: 1b6198e4046e1a5180e43ea7da99af233dfeea81 build id event received for /usr/lib/aarch64-linux-gnu/libargon2.so.1: 86e955c64ef22244e835cc9fb0ba94b795f2eb14 build id event received for /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1: 9d6ec9d71e6645d62508e0995b3e1e1f6ff4a794 build id event received for /usr/lib/aarch64-linux-gnu/libdevmapper.so.1.02.1: cbd0ab6d9451f6b5f2cb06bac707743103fe7ce9 build id event received for /usr/lib/aarch64-linux-gnu/libuuid.so.1.3.0: 8303eacf3bc69319cdf557170e4f1ad52c30dfed build id event received for /usr/lib/aarch64-linux-gnu/libcap-ng.so.0.0.0: a352b17c5743903435e97a21ab4c8ad9a5600a11 build id event received for /usr/lib/aarch64-linux-gnu/libdl-2.29.so: 4f96262f80f432989340dc13aeefa0bc9f361650 build id event received for /usr/lib/aarch64-linux-gnu/libpcre.so.3.13.3: 9e72776b3c212045536672c26406d943234e1faf build id event received for /usr/lib/aarch64-linux-gnu/libpthread-2.29.so: e5c4d4d4895c700188b8cfc9c2846f07766162f8 build id event received for /usr/lib/aarch64-linux-gnu/libm-2.29.so: 5dd4d713238e64fe67bc32d0d28e2f06473d0416 build id event received for /usr/lib/aarch64-linux-gnu/libblkid.so.1.1.0: 9896820a111c83e02cf50fd406d2bbe8ff5fc22b build id event received for /usr/lib/aarch64-linux-gnu/liblz4.so.1.8.3: 6ac9fbdff8113ecac26a38e632c86bef7cc1289b build id event received for /usr/lib/aarch64-linux-gnu/liblzma.so.5.2.4: eca504ae80d3886619a5dc07f97b7f7f12738e1c build id event received for /usr/lib/aarch64-linux-gnu/libidn.so.11.6.16: 09c4ed016c7169ec678e5c5a6dea5350880a55d1 build id event received for /usr/lib/aarch64-linux-gnu/libip4tc.so.0.1.0: 98c3f47dfb928985ef397e139bed4f25d0eca31c build id event received for /usr/lib/aarch64-linux-gnu/libgcrypt.so.20.2.4: 05d00e33a715a4cae1dd56600b59fc149359a9a2 build id event received for /usr/lib/aarch64-linux-gnu/libcryptsetup.so.12.4.0: cb105fc8cc49c98020bd44c600469afbde1bc0c0 build id event received for /usr/lib/aarch64-linux-gnu/libacl.so.1.1.2253: bc6bada1bacd0d11f1725ed68e9ecedaa48dc07b build id event received for /usr/lib/aarch64-linux-gnu/libcap.so.2.25: fd18ab1acf376142ccd2f3dc57506259b0d265ad build id event received for /usr/lib/aarch64-linux-gnu/libapparmor.so.1.6.0: 987ff78cba4277e05e974afae62a1bb14554d65a build id event received for /usr/lib/aarch64-linux-gnu/libkmod.so.2.3.3: 8b7d5f414fd2b0df3f67c211555b534886ed4c1a build id event received for /usr/lib/aarch64-linux-gnu/libaudit.so.1.0.0: 614096a550fa30ef01381e694b85358e19ba217d build id event received for /usr/lib/aarch64-linux-gnu/libpam.so.0.84.2: 1913abf074658a33972fd7609edfb3cd50562f98 build id event received for /usr/lib/aarch64-linux-gnu/libmount.so.1.1.0: 62224a81d1ab936364a23309e4aa512e3dbfe0d3 build id event received for /usr/lib/aarch64-linux-gnu/libselinux.so.1: 97c9cdae5e61c677411072984b06b6940fb0c57e build id event received for /usr/lib/aarch64-linux-gnu/libseccomp.so.2.4.1: 006b3eaeabbb4639e39c5cced8a71ae335f4dcf9 build id event received for /usr/lib/aarch64-linux-gnu/librt-2.29.so: 7cd8d9a95b21c7c530393d521df07bd68f88e87f build id event received for /usr/lib/systemd/libsystemd-shared-240.so: c53be4f327dca3a0eedf0b0087554723ff9de1fb build id event received for /usr/lib/aarch64-linux-gnu/libc-2.29.so: 603256104e15abbf9b4ac424a2bed765afeaf586 build id event received for [vdso]: 5b62d344293cdefcd6256fef6439376111afbcb3 build id event received for /usr/lib/aarch64-linux-gnu/ld-2.29.so: 980b05101e9d37080d52c1f15a93783d039a36ec build id event received for /usr/lib/systemd/systemd-journald: f31389759fd44ee6ee05d37b27c45eb66fc1ef32 build id event received for /usr/sbin/lvmetad: f6b7bef0f7e1535180b95b5793f511189dc6d420 build id event received for /usr/lib/systemd/systemd-udevd: e5755a14d86af63c4307bc8deff427d30ab15bfe build id event received for /usr/lib/aarch64-linux-gnu/libnss_files-2.29.so: 0d4b385f2a8c90241ef9ebbdc740345fb540ebaa build id event received for /usr/lib/systemd/systemd-networkd: 830646412e183e6e9362b8f72bab24c4c85b87c5 build id event received for /usr/lib/systemd/systemd-resolved: 2f2be07c0b8c88f5730337e3d1175e4f2b0e99f3 build id event received for /usr/lib/aarch64-linux-gnu/libffi.so.6.0.4: df2fe90af7ec5b69d1eaecd5db5cc8209377e946 build id event received for /usr/lib/aarch64-linux-gnu/libgmp.so.10.3.2: a7a1cad72140263b96408a09c55e58b4981a40e1 build id event received for /usr/lib/aarch64-linux-gnu/libhogweed.so.4.5: 78512c27099e9d47eb5f5f4aa96c5519eb4e34e0 build id event received for /usr/lib/aarch64-linux-gnu/libnettle.so.6.5: d50e62e092578f01454e26931ae1d37d7e3e3e7e build id event received for /usr/lib/aarch64-linux-gnu/libtasn1.so.6.5.5: a216dc183fed690380a4ff97a11e354240ab1767 build id event received for /usr/lib/aarch64-linux-gnu/libunistring.so.2.1.0: cd6f7eaac70757a32b77e68cfd8ace3897fbfce7 build id event received for /usr/lib/aarch64-linux-gnu/libidn2.so.0.3.4: 1a8d591990cd60ff2ef6a90e6c310b931461b41a build id event received for /usr/lib/aarch64-linux-gnu/libp11-kit.so.0.3.0: 8c3c4f1bf3731213c96312bf7806d44e8faa11fb build id event received for /usr/lib/aarch64-linux-gnu/libgnutls.so.30.23.0: 64fc4a0926eb131eb02d6b135a06b1d6e9a43d72 build id event received for /usr/lib/systemd/systemd-timesyncd: dc188e1f338ebf0c20906ac842f5b44804874295 build id event received for /usr/sbin/irqbalance: 35eecea92bc2a0bd2acb7bf9bfe3fb16a7b9b175 build id event received for /usr/lib/aarch64-linux-gnu/libnuma.so.1.0.0: 79e2140842284a44f20ab6e33de2827c8717bee7 build id event received for /usr/lib/aarch64-linux-gnu/libsystemd.so.0.24.0: dad5e77cc471d0f6180cf4740264d024400bfbc6 build id event received for /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0.6000.4: 0a17d94419a4e28e192db8e7a92d2949f980477b build id event received for /usr/lib/accountsservice/accounts-daemon: 46997e9cf6bee230d9ae51d5fa2718d51fd5b49a build id event received for /usr/lib/aarch64-linux-gnu/libresolv-2.29.so: a1a32157b3d13ffab5cf4cbd3f9b2eeccb83e0cf build id event received for /usr/lib/aarch64-linux-gnu/libz.so.1.2.11: c44db83bf6e2d2ac5fc821be6acc31c8934b90d3 build id event received for /usr/lib/aarch64-linux-gnu/libgmodule-2.0.so.0.6000.4: 264f79a947cb8eb0a332dd11a8594b6a735ea82a build id event received for /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0.6000.4: 62b2f44b0b34233d8636eb705721c93a18593e7d build id event received for /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0.6000.4: 4bcb303f8f7d3ae191e7085f51c0e214ac97b840 build id event received for /usr/lib/aarch64-linux-gnu/libpolkit-gobject-1.so.0.0.0: 2223bd3dd473a65f42374913de261cbc191d8444 build id event received for /usr/sbin/cron: b53d5e537eb1f076fb0c32c0f2b25395e1d1e9c1 build id event received for /usr/lib/systemd/systemd-logind: 411afe4eafdf8f725e3bedc24ba9504d8fe21976 build id event received for /usr/bin/dbus-daemon: 7e53d8b69b309832019aafd7a1f42d9ec2e44f30 build id event received for /usr/lib/aarch64-linux-gnu/libnss_systemd.so.2: 9dcd8d96a743eed92a7c3774b4a9a6ce5eabfb8c build id event received for /usr/lib/aarch64-linux-gnu/libexpat.so.1.6.8: fa04e79c8ea4a0959f60a74e03b87fa569a2881c build id event received for /usr/lib/aarch64-linux-gnu/libdbus-1.so.3.19.9: a46310cc5caa1004e68948680cdb7d37fda5c8e9 build id event received for /usr/sbin/rsyslogd: 1da54ff91b92a9abe2a77fcc4d758e8d274d4212 build id event received for /usr/lib/aarch64-linux-gnu/rsyslog/imklog.so: 854a20f163e36d27340b1763976de386af6e4ba1 build id event received for /usr/lib/aarch64-linux-gnu/rsyslog/imuxsock.so: 208a76a7e53d0b70046f7f193875a257705d0bfd build id event received for /usr/lib/aarch64-linux-gnu/rsyslog/lmnet.so: a97bdd52c8ed962cdf1ee8a63b7305cb2c35f85c build id event received for /usr/lib/aarch64-linux-gnu/libfastjson.so.4.2.0: 3ca7b00fc1bfeb178f84e4b6be25ed7a3c51862f build id event received for /usr/lib/aarch64-linux-gnu/libestr.so.0.0.0: 75b8177c401b24f4d0c1b2087ca8b6e53e2c9574 build id event received for /usr/bin/python3.7: dded270f2fff6c92e32623d5b1f952a79e6b30dc build id event received for /usr/lib/python3/dist-packages/_dbus_glib_bindings.cpython-37m-aarch64-linux-gnu.so: 2344eee39ca3f5b139e83ae042beef69bff98a26 build id event received for /usr/lib/python3/dist-packages/_dbus_bindings.cpython-37m-aarch64-linux-gnu.so: e16568205c83412f0af890b03866bc970c76c9e7 build id event received for /usr/lib/aarch64-linux-gnu/libgirepository-1.0.so.1.0.0: 8154ac3e4b041b78fa71b954a173ca46ab1419d1 build id event received for /usr/lib/python3/dist-packages/gi/_gi.cpython-37m-aarch64-linux-gnu.so: 3d8305ca9975dbadc9de106f5206352467e5e480 build id event received for /usr/lib/python3.7/lib-dynload/_json.cpython-37m-aarch64-linux-gnu.so: c48a4ab3a4f7c9ae71ba8030d4b3a86d25355b29 build id event received for /usr/lib/aarch64-linux-gnu/libutil-2.29.so: f39de510d61a63e3510822c014b876b9f4b0f554 build id event received for /usr/sbin/atd: 1a67fe66d7aadded300cbee7fb978e598577b304 build id event received for /usr/bin/login: eaaedc0422e5e3009a41d5b3263481011ae6d7cb build id event received for /usr/lib/aarch64-linux-gnu/security/pam_systemd.so: 7fd1ec64e85b93e9dc07ae28519325643dac66de build id event received for /usr/lib/aarch64-linux-gnu/security/pam_umask.so: 4c79ebec2611d28ba3a0880bb4484bb702009771 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_keyinit.so: 1e504a2b976cfb64604ebb44850841e7c08fad52 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_mail.so: ccb6a87b4b736254d2e1cccaaf1cf772aa728e1a build id event received for /usr/lib/aarch64-linux-gnu/security/pam_motd.so: e1f810044a7b9cf746aa3272639e8219d2af5eec build id event received for /usr/lib/aarch64-linux-gnu/security/pam_lastlog.so: 54b460eac76aee2ee4766f8fa788780e9b1c6759 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_limits.so: d1f5ebfdeb63f801418ab874d6524830cd75281a build id event received for /usr/lib/aarch64-linux-gnu/security/pam_group.so: c60047324e47c4a657ac9bce6ade37dd62944866 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_cap.so: 1a74f1bab9faa15b738282d6ba3c20c5fcee379a build id event received for /usr/lib/aarch64-linux-gnu/security/pam_permit.so: bda93a144c61f07deff4eaf9db530de8e81aadd8 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_deny.so: 9133f542ae8a21ee0b15b171b6229e88ab9854f3 build id event received for /usr/lib/aarch64-linux-gnu/libnsl-2.29.so: cc4ce30fe19e78cbfa0206c43fc389d930894ecb build id event received for /usr/lib/aarch64-linux-gnu/libcrypt-2.29.so: edda22cf0de584c9a3f2faffe81c658a3bde8c19 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_unix.so: c51bad97178929c97c167d98e52efa482c25348f build id event received for /usr/lib/aarch64-linux-gnu/security/pam_env.so: 5a10f388ae21b29d44393558ed0cea5a81e7e42b build id event received for /usr/lib/aarch64-linux-gnu/security/pam_loginuid.so: df246ce2a782154512fec5a992192f6fc8ff1feb build id event received for /usr/lib/aarch64-linux-gnu/security/pam_selinux.so: 0bfdb5ff7fa8528467ec6bc26c9ac77abc5aa4fa build id event received for /usr/lib/aarch64-linux-gnu/security/pam_nologin.so: 86d2a51dbf9fec35ed0de7d8c160346643c0fcbb build id event received for /usr/lib/aarch64-linux-gnu/security/pam_securetty.so: 7ebc446fd0677fc5fb57e59415bb75bab4651b40 build id event received for /usr/lib/aarch64-linux-gnu/security/pam_faildelay.so: f4d745095efc11e140878e32ae28f2e7b6d5e2af build id event received for /usr/lib/aarch64-linux-gnu/libpam_misc.so.0.82.1: e2299eceff2b194fc42d49933f3dbac87880d6b5 build id event received for /usr/sbin/agetty: d39506dc54595d8b154de263a9cbacb99417eaba build id event received for /usr/lib/aarch64-linux-gnu/libzstd.so.1.3.8: 3b1b80c9185d367e0a1ff7a8e56b3799c84219f6 build id event received for /usr/lib/aarch64-linux-gnu/libbz2.so.1.0.4: 980f3433a428da4240df8ee19376383ccc6da1f8 build id event received for /usr/lib/aarch64-linux-gnu/libgcc_s.so.1: 5387dc6b94ab74c4c1e80a2003cedf15dade6e05 build id event received for /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.26: 52f444cb969e356e077c5d1a48ca5e209d3d33dd build id event received for /usr/lib/aarch64-linux-gnu/libapt-pkg.so.5.0.2: 1ff303d272c7dc6f6cd253e14ef096ce72b70be7 build id event received for /usr/lib/python3/dist-packages/apt_pkg.cpython-37m-aarch64-linux-gnu.so: 24f4deeb9e7e6d5229d4804510d5fea4bbcb2854 build id event received for /usr/lib/python3.7/lib-dynload/_queue.cpython-37m-aarch64-linux-gnu.so: c7beb16aa0165eb421269cfb8d1f8ad2ab46ae2e build id event received for /usr/sbin/sshd: a17e1735f3ae66f1ec6cee81ebd881d471199633 build id event received for /usr/lib/aarch64-linux-gnu/libkeyutils.so.1.8: fd81c590b628d841d671c60962c15905b8ce3753 build id event received for /usr/lib/aarch64-linux-gnu/libkrb5support.so.0.1: 3115b69cf74d7e8ae608c8e1998acb1b41fb7369 build id event received for /usr/lib/aarch64-linux-gnu/libk5crypto.so.3.1: e0f42b94f854e10534c1ce1fc0b5f60ac9abb9db build id event received for /usr/lib/aarch64-linux-gnu/libcom_err.so.2.1: 1c9960ee7f7bba3e6ce87416e3f4db3f9beb384a build id event received for /usr/lib/aarch64-linux-gnu/libkrb5.so.3.3: b3422fbee92ee274730d23387778e7450f533e12 build id event received for /usr/lib/aarch64-linux-gnu/libgssapi_krb5.so.2.2: 5fa526d354e92be3bd482c601ff2b3c6fb602ec1 build id event received for /usr/lib/aarch64-linux-gnu/libwrap.so.0.7.6: 921155d6f44e570f73bbcd02aa8808c092a24d43 build id event received for /usr/bin/bash: 09a46e53ca3fa7c40f4d2d7932b57473cf168944 build id event received for /usr/lib/aarch64-linux-gnu/libtinfo.so.6.1: ad784690ba2c469a2d6b2314f11d9960378b5caf build id event received for /usr/bin/perf: e37baeef03fdf4e7524e25526c247c0cff275425 build id event received for /usr/lib/aarch64-linux-gnu/libbabeltrace.so.1.0.0: 3654ae63e8d11d60ae3713ecc0498362f0d179fd build id event received for /usr/lib/libopencsd.so.0.12.0: 00cc7a8df399680da3f894ebff0ee2b4d7adf7f8 build id event received for /usr/lib/aarch64-linux-gnu/libbabeltrace-ctf.so.1.0.0: 99f0493f3639b31777af1fd2d6a83ce2a6e0e06a build id event received for /usr/lib/aarch64-linux-gnu/libopcodes-2.32-system.so: b7545ada3b99daf0e762c40f71d13ba0556df535 build id event received for /usr/lib/aarch64-linux-gnu/libbfd-2.32-system.so: 1d879469d8262fd1f4b85231692623089703e599 build id event received for /usr/lib/aarch64-linux-gnu/libpython2.7.so.1.0: e63e3c48ad3cf9de376c440020e5a0962b2a68ce build id event received for /usr/lib/aarch64-linux-gnu/libperl.so.5.28.1: 4e7b1a7670a7fbed0810a8de94a86e8c8c014bab build id event received for /usr/lib/aarch64-linux-gnu/libslang.so.2.3.2: 97826dc9489ba7f3e77ef5b0ffcc046b3b51c769 build id event received for /usr/lib/aarch64-linux-gnu/libunwind-aarch64.so.8.0.1: 9e4ba53d2e6b5b612cc2847eb8ee3e5f5a33df77 build id event received for /usr/lib/aarch64-linux-gnu/libunwind.so.8.0.1: 8e47f87e68ff826db948ea9fa35fc364679b42e2 build id event received for /usr/lib/aarch64-linux-gnu/libdw-0.176.so: ad9dc3a40b2f39629fcc70ad2bb931d75f89b748 build id event received for /usr/lib/aarch64-linux-gnu/libelf-0.176.so: 0b36ddcd158758dcb8356713eff8fe12c1326d21 build id event received for /usr/lib/libopencsd_c_api.so.0.12.0: 84a1cf9a8b6efb9670b902d87118f05c81856b53 build id event received for /root/main: b9b1be8385b8a5dcc510e4d8b367c98bc8e93948 0x178 [0x70]: failed to process type: 70 Error: failed to process sample bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device *dev, u32 offset) * accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read, ®, 1); + + /* + * OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet + * feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible. + */ + if ((offset == TRCIDR1) && + (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) { + reg.data &= ~0xF0; + reg.data |= 0x30; + } + return reg.data; }
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1); + + /* + * OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet + * feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible. + */ + if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) { + etmidr1 &= ~0xF0; + etmidr1 |= 0x30; + } + /* * TRCARCHMIN, bits[7:4] architecture the minor version number * TRCARCHMAJ, bits[11:8] architecture major versin number @@ -1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) if (drvdata->cpu < 0) return drvdata->cpu;
+ /* Enable options for Silicon issues */ + if (id->id == OCTEONTX_CN9XXX_ETM) + drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43; + desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata->cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat ETMv4.2 as ETMv4.3 */ + +/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210 + /** * struct etmv4_config - configuration information related to an ETMv4 * @mode: Controls various modes supported by this ETM. @@ -287,6 +293,7 @@ struct etmv4_config { * @csdev: Component vitals needed by the framework. * @spinlock: Only one at a time pls. * @mode: This tracer's mode, i.e sysFS, Perf or disabled. + * @etm_options: Bitmask of options to manage ETMv4 Silicon issues * @cpu: The cpu this component is affined to. * @arch: ETM version number. * @nr_pe: The number of processing entity available for tracing. @@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode; + u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace
decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
- Kernel trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home)
=> perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k'
# Event count (approx.): 937
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... ................. ..............................................
#
15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
8.54% 8.54% swapper [kernel.kallsyms] [k]
arch_counter_get_cntpct
3.31% 3.31% swapper [kernel.kallsyms] [k]
event_sched_in.isra.37
2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in
2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
2.35% 2.35% swapper [kernel.kallsyms] [k]
perf_event_update_userpage
2.24% 2.24% swapper [kernel.kallsyms] [k]
clocks_calc_mult_shift
- User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/
(home)
=> perf report
Error:
The perf.data data has no samples!
# To display the perf.data header info, please use --header/--header-
only options.
#
But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
=> perf report --dump
. ... CoreSight ETM Trace data: size 25960 bytes
Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
Idx:39; ID:12; I_TRACE_ON : Trace On.
Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL2, NS;
CID=0x00000000;
Idx:46; ID:12; I_TRACE_ON : Trace On.
Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL0, NS;
CID=0x00000000;
Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.;
Addr=0x0000FFFF801CCF7C;
Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val =
0xede4824ce5
. . .
Any idea what I am missing.
Thanks
-Bharat
CoreSight mailing list
CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6R0 mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m= GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-wWc8g- N02AMoUehx2BriCCEbr9VPmuaDw&e=
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2 but it adds "Ignore Packet - 0x70". Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device *dev, u32 offset) * accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read, ®, 1);
- /*
* OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
* feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
*/
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
} diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info) /* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
* OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
* feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
*/
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number
@@ -1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata->cpu); if (!desc.name) return -ENOMEM;
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15) +/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat ETMv4.2 as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace
decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
- Kernel trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home)
=> perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k'
# Event count (approx.): 937
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... ................. ..............................................
#
15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
8.54% 8.54% swapper [kernel.kallsyms] [k]
arch_counter_get_cntpct
3.31% 3.31% swapper [kernel.kallsyms] [k]
event_sched_in.isra.37
2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in
2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
2.35% 2.35% swapper [kernel.kallsyms] [k]
perf_event_update_userpage
2.24% 2.24% swapper [kernel.kallsyms] [k]
clocks_calc_mult_shift
- User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/
(home)
=> perf report
Error:
The perf.data data has no samples!
# To display the perf.data header info, please use --header/--header-
only options.
#
But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
=> perf report --dump
. ... CoreSight ETM Trace data: size 25960 bytes
Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
Idx:39; ID:12; I_TRACE_ON : Trace On.
Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL2, NS;
CID=0x00000000;
Idx:46; ID:12; I_TRACE_ON : Trace On.
Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: AArch64,EL0, NS;
CID=0x00000000;
Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.;
Addr=0x0000FFFF801CCF7C;
Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val =
0xede4824ce5
. . .
Any idea what I am missing.
Thanks
-Bharat
CoreSight mailing list
CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6R0 mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m= GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-wWc8g- N02AMoUehx2BriCCEbr9VPmuaDw&e=
Hello,
I will look in more details in code you mentioned.
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00 ........@....... . 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2
but it adds "Ignore Packet - 0x70".
Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe
I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device
*dev, u32 offset)
* accessing the ETMv4 trace core registers */
smp_call_function_single(drvdata->cpu, do_smp_cross_read, ®,
1);
- /*
* OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
* feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
*/
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
}
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
* OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
* feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
*/
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number @@
-1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev,
const struct amba_id *id)
if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata-
cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat ETMv4.2
as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
-- Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace
decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
- Kernel trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home)
=> perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k'
# Event count (approx.): 937
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... ................. ..............................................
#
15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
8.54% 8.54% swapper [kernel.kallsyms] [k]
arch_counter_get_cntpct
3.31% 3.31% swapper [kernel.kallsyms] [k]
event_sched_in.isra.37
2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in
2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
2.35% 2.35% swapper [kernel.kallsyms] [k]
perf_event_update_userpage
2.24% 2.24% swapper [kernel.kallsyms] [k]
clocks_calc_mult_shift
- User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug
in ~/
(home)
=> perf report
Error:
The perf.data data has no samples!
# To display the perf.data header info, please use
--header/--header-
only options.
#
But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
=> perf report --dump
. ... CoreSight ETM Trace data: size 25960 bytes
Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
Idx:39; ID:12; I_TRACE_ON : Trace On.
Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL2, NS;
CID=0x00000000;
Idx:46; ID:12; I_TRACE_ON : Trace On.
Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL0, NS;
CID=0x00000000;
Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit,
IS0.;
Addr=0x0000FFFF801CCF7C;
Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val =
0xede4824ce5
. . .
Any idea what I am missing.
Thanks
-Bharat
CoreSight mailing list
CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g-
N02AMoUehx2BriCCEbr9VPmuaDw&e=
On Tue, 5 Nov 2019 at 07:07, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
I will look in more details in code you mentioned.
Yes, I think this is the right thing to do. I'm pretty sure function cs_etm__process_auxtrace_info() is finding something it doesn't like. Why it works for kernel traces but not user space trace is puzzling though. Usually it is the other way around.
I've also seen problems such as this one when the decoder can't lookup the address of the instructions being decoded in cs_etm__mem_access[1].
There may be several problems here and it is very likely you will have to trace a fair amount of code to find the root cause of the issue(s).
[1]. https://elixir.bootlin.com/linux/latest/source/tools/perf/util/cs-etm.c#L634
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00 ........@....... . 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2
but it adds "Ignore Packet - 0x70".
Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe
I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device
*dev, u32 offset)
* accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read, ®,
1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
}
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number @@
-1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev,
const struct amba_id *id)
if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata-
cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat ETMv4.2
as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
-- Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace
decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
- Kernel trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home)
=> perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k'
# Event count (approx.): 937
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... ................. ..............................................
#
15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
8.54% 8.54% swapper [kernel.kallsyms] [k]
arch_counter_get_cntpct
3.31% 3.31% swapper [kernel.kallsyms] [k]
event_sched_in.isra.37
2.67% 2.67% swapper [kernel.kallsyms] [k] group_sched_in
2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
2.35% 2.35% swapper [kernel.kallsyms] [k]
perf_event_update_userpage
2.24% 2.24% swapper [kernel.kallsyms] [k]
clocks_calc_mult_shift
- User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug
in ~/
(home)
=> perf report
Error:
The perf.data data has no samples!
# To display the perf.data header info, please use
--header/--header-
only options.
#
But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
=> perf report --dump
. ... CoreSight ETM Trace data: size 25960 bytes
Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
Idx:39; ID:12; I_TRACE_ON : Trace On.
Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL2, NS;
CID=0x00000000;
Idx:46; ID:12; I_TRACE_ON : Trace On.
Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL0, NS;
CID=0x00000000;
Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 bit,
IS0.;
Addr=0x0000FFFF801CCF7C;
Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val =
0xede4824ce5
. . .
Any idea what I am missing.
Thanks
-Bharat
CoreSight mailing list
CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g-
N02AMoUehx2BriCCEbr9VPmuaDw&e=
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight
Hello,
First of all I am sorry, I was supposed to run "./perf" while I was running "perf" when taking output "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
I am attaching the output of " perf --debug verbose=10 report --stdio > perf_report_dbg.log"
Thanks -Bharat
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Tuesday, November 5, 2019 10:21 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 07:07, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
I will look in more details in code you mentioned.
Yes, I think this is the right thing to do. I'm pretty sure function cs_etm__process_auxtrace_info() is finding something it doesn't like. Why it works for kernel traces but not user space trace is puzzling though. Usually it is the other way around.
I've also seen problems such as this one when the decoder can't lookup the address of the instructions being decoded in cs_etm__mem_access[1].
There may be several problems here and it is very likely you will have to trace a fair amount of code to find the root cause of the issue(s).
[1]. https://urldefense.proofpoint.com/v2/url?u=https- 3A__elixir.bootlin.com_linux_latest_source_tools_perf_util_cs-2Detm.c- 23L634&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGb CLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrHnfjOr99WId oBnEkbzYFcwc&s=RZ-L4pyrmAq8F60e8nxlhIGBYchDeSEPVWKMv1_Ortc&e=
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00
........@.......
. 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2
but it adds "Ignore Packet - 0x70".
Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe
I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device
*dev, u32 offset)
* accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read,
®,
1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
}
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number @@
-1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev,
const struct amba_id *id)
if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata-
cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat
ETMv4.2
as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon
- issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
-- Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
Hi All,
Linux h/w trace decoding is working as expected but user-space trace
decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
Here is how I am using:
- Kernel trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2
uname
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy .debug in ~/ (home)
=> perf report --vmlinux=./vmlinux
# Samples: 937 of event 'branches:k'
# Event count (approx.): 937
#
# Children Self Command Shared Object Symbol
# ........ ........ ....... ................. ..............................................
#
15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
8.54% 8.54% swapper [kernel.kallsyms] [k]
arch_counter_get_cntpct
3.31% 3.31% swapper [kernel.kallsyms] [k]
event_sched_in.isra.37
2.67% 2.67% swapper [kernel.kallsyms] [k]
group_sched_in
2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
2.35% 2.35% swapper [kernel.kallsyms] [k]
perf_event_update_userpage
2.24% 2.24% swapper [kernel.kallsyms] [k]
clocks_calc_mult_shift
- User-space trace
=> perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2
uname
I verified this command on DB410c, it can record and report well.
=> tar czf cs_example.tgz perf.data .debug
Transfer cs_example.tgz on x86 machine, untar, copy
.debug in ~/
(home)
=> perf report
Error:
The perf.data data has no samples!
# To display the perf.data header info, please use
--header/--header-
only options.
#
But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
=> perf report --dump
. ... CoreSight ETM Trace data: size 25960 bytes
Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
Idx:39; ID:12; I_TRACE_ON : Trace On.
Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL2, NS;
CID=0x00000000;
Idx:46; ID:12; I_TRACE_ON : Trace On.
Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt:
AArch64,EL0, NS;
CID=0x00000000;
Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64
bit, IS0.;
Addr=0x0000FFFF801CCF7C;
Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val
=
0xede4824ce5
. . .
Any idea what I am missing.
Thanks
-Bharat
CoreSight mailing list
CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m =
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g-
N02AMoUehx2BriCCEbr9VPmuaDw&e=
CoreSight mailing list CoreSight@lists.linaro.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_
mailman_listinfo_coresight&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=P AAlWsw
Pe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrH nfjOr99WId
oBnEkbzYFcwc&s=jHuu9gSD-
LeOv0dKLThWRZwwcY1_1CgcU5FBtLFxZoc&e=
On Tue, 5 Nov 2019 at 23:10, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
First of all I am sorry, I was supposed to run "./perf" while I was running "perf" when taking output "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
I am attaching the output of " perf --debug verbose=10 report --stdio > perf_report_dbg.log"
A thought just struck me this morning... Aren't you dealing with a 1:1 source/sink topology in your design?
Thanks -Bharat
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Tuesday, November 5, 2019 10:21 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 07:07, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
I will look in more details in code you mentioned.
Yes, I think this is the right thing to do. I'm pretty sure function cs_etm__process_auxtrace_info() is finding something it doesn't like. Why it works for kernel traces but not user space trace is puzzling though. Usually it is the other way around.
I've also seen problems such as this one when the decoder can't lookup the address of the instructions being decoded in cs_etm__mem_access[1].
There may be several problems here and it is very likely you will have to trace a fair amount of code to find the root cause of the issue(s).
[1]. https://urldefense.proofpoint.com/v2/url?u=https- 3A__elixir.bootlin.com_linux_latest_source_tools_perf_util_cs-2Detm.c- 23L634&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGb CLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrHnfjOr99WId oBnEkbzYFcwc&s=RZ-L4pyrmAq8F60e8nxlhIGBYchDeSEPVWKMv1_Ortc&e=
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00
........@.......
. 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2
but it adds "Ignore Packet - 0x70".
Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe
I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device
*dev, u32 offset)
* accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read,
®,
1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
}
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number @@
-1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev,
const struct amba_id *id)
if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options = CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", drvdata-
cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat
ETMv4.2
as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon
- issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 4:38 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: [EXT] Re: perf: user-space trace decoding
External Email
-- Hi Bharat,
On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan wrote:
> Hi All,
>
> Linux h/w trace decoding is working as expected but user-space > trace decoding not showing sybmols (dump raw trace shows h/w trace info) of user-space application/libraries.
>
> Here is how I am using:
>
> 1) Kernel trace
> => perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 > uname
>
> => tar czf cs_example.tgz perf.data .debug
>
> Transfer cs_example.tgz on x86 machine, untar, copy .debug > in ~/ (home)
> => perf report --vmlinux=./vmlinux
>
> # Samples: 937 of event 'branches:k'
> # Event count (approx.): 937
> #
> # Children Self Command Shared Object Symbol
> # ........ ........ ....... ................. ..............................................
> #
> 15.58% 15.58% swapper [kernel.kallsyms] [k] __delay
> 8.54% 8.54% swapper [kernel.kallsyms] [k] arch_counter_get_cntpct
> 3.31% 3.31% swapper [kernel.kallsyms] [k] event_sched_in.isra.37
> 2.67% 2.67% swapper [kernel.kallsyms] [k]
group_sched_in
> 2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle
> 2.35% 2.35% swapper [kernel.kallsyms] [k] perf_event_update_userpage
> 2.24% 2.24% swapper [kernel.kallsyms] [k] clocks_calc_mult_shift
>
> 2) User-space trace
>
> => perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 > uname
I verified this command on DB410c, it can record and report well.
> => tar czf cs_example.tgz perf.data .debug
>
> Transfer cs_example.tgz on x86 machine, untar, copy > .debug in ~/ (home)
> => perf report
> Error:
> The perf.data data has no samples!
> # To display the perf.data header info, please use > --header/--header- only options.
> #
> But if dump raw trace then I can see ISYNC/ATOM packets
One potential reason is perf cannot find the correct DSO file. Could
you use below command to output more verbose log?
# perf --debug verbose=10 report --stdio > perf_report_dbg.log
Maybe can find more hints for this failure.
Thanks,
Leo Yan
> => perf report --dump
> . ... CoreSight ETM Trace data: size 25960 bytes
> Idx:24; ID:12; I_ASYNC : Alignment Synchronisation.
> Idx:36; ID:12; I_TRACE_INFO : Trace Info.; INFO=0x0
> Idx:39; ID:12; I_TRACE_ON : Trace On.
> Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: > AArch64,EL2, NS; CID=0x00000000;
> Idx:46; ID:12; I_TRACE_ON : Trace On.
> Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: > AArch64,EL0, NS; CID=0x00000000;
> Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 > bit, IS0.; Addr=0x0000FFFF801CCF7C;
> Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N
> Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated val > = 0xede4824ce5
> . . .
>
> Any idea what I am missing.
>
> Thanks
> -Bharat
> _______________________________________________
> CoreSight mailing list
> CoreSight@lists.linaro.org
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m =
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g-
N02AMoUehx2BriCCEbr9VPmuaDw&e=
CoreSight mailing list CoreSight@lists.linaro.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_
mailman_listinfo_coresight&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=P AAlWsw
Pe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrH nfjOr99WId
oBnEkbzYFcwc&s=jHuu9gSD-
LeOv0dKLThWRZwwcY1_1CgcU5FBtLFxZoc&e=
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Wednesday, November 6, 2019 8:53 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 23:10, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
First of all I am sorry, I was supposed to run "./perf" while I was running
"perf" when taking output "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
I am attaching the output of " perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
A thought just struck me this morning... Aren't you dealing with a 1:1 source/sink topology in your design?
Yes, 1 core - 1 ETM and 1 ETR. Device tree is used for defining source<->sink relation.
Do you think the issue I am facing (kernel tracing working while user-space tracing with raw dump also working, and user-space not showing symbols) have relation with 1:1 source/sink.
Thanks -Bharat
Thanks -Bharat
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Tuesday, November 5, 2019 10:21 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 07:07, Bharat Bhushan
wrote:
Hello,
I will look in more details in code you mentioned.
Yes, I think this is the right thing to do. I'm pretty sure function cs_etm__process_auxtrace_info() is finding something it doesn't like. Why it works for kernel traces but not user space trace is puzzling though. Usually it is the other way around.
I've also seen problems such as this one when the decoder can't lookup the address of the instructions being decoded in
cs_etm__mem_access[1].
There may be several problems here and it is very likely you will have to trace a fair amount of code to find the root cause of the issue(s).
[1]. https://urldefense.proofpoint.com/v2/url?u=https- 3A__elixir.bootlin.com_linux_latest_source_tools_perf_util_cs-2Detm. c-
23L634&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGb
CLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrHnfjOr99WId
oBnEkbzYFcwc&s=RZ-
L4pyrmAq8F60e8nxlhIGBYchDeSEPVWKMv1_Ortc&e=
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00
........@.......
. 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote:
Hello,
Below is output of "perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
It fails with type 0x70. Is this "ignore packet header "? It should workn because
Earlier I have seen this failing with "Reserved Packet" as h/w was ETM4.2
but it adds "Ignore Packet - 0x70".
Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in the end). Maybe
I missed something.
[...]
0x178 [0x70]: failed to process type: 70 Error: failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
bharat@bharat-OptiPlex-3070:~/trace$
=======
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 219c10eb752c..afbdba22eb2a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const struct device
*dev, u32 offset)
* accessing the ETMv4 trace core registers */ smp_call_function_single(drvdata->cpu, do_smp_cross_read,
®,
1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if ((offset == TRCIDR1) &&
(drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) {
reg.data &= ~0xF0;
reg.data |= 0x30;
- }
- return reg.data;
}
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6296837ca00d..ada87018317b 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void *info)
/* base architecture of trace unit */ etmidr1 = readl_relaxed(drvdata->base + TRCIDR1);
- /*
- OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet
- feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible.
- */
- if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) {
etmidr1 &= ~0xF0;
etmidr1 |= 0x30;
- }
- /*
- TRCARCHMIN, bits[7:4] architecture the minor version number
- TRCARCHMAJ, bits[11:8] architecture major versin number
@@ -1115,6 +1125,10 @@ static int etm4_probe(struct amba_device *adev,
const struct amba_id *id)
if (drvdata->cpu < 0) return drvdata->cpu;
- /* Enable options for Silicon issues */
- if (id->id == OCTEONTX_CN9XXX_ETM)
drvdata->etm_options =
- CORESIGHT_OPTS_TREAT_ETMv43;
- desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d",
drvdata- cpu); if (!desc.name) return -ENOMEM; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 4523f10ddd0f..b16f66be8606 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -191,6 +191,12 @@ #define ETM_EXLEVEL_NS_HYP BIT(14) #define ETM_EXLEVEL_NS_NA BIT(15)
+/* Marvell OcteonTx CN9xxx ETM HW issues */ +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat
ETMv4.2
as ETMv4.3 */
+/* Marvell OcteonTx CN9xxx ETM device */ +#define OCTEONTX_CN9XXX_ETM 0x000cc210
/**
- struct etmv4_config - configuration information related to an
ETMv4
- @mode: Controls various modes supported by this ETM.
@@ -287,6 +293,7 @@ struct etmv4_config {
- @csdev: Component vitals needed by the framework.
- @spinlock: Only one at a time pls.
- @mode: This tracer's mode, i.e sysFS, Perf or disabled.
- @etm_options: Bitmask of options to manage ETMv4 Silicon
- issues
- @cpu: The cpu this component is affined to.
- @arch: ETM version number.
- @nr_pe: The number of processing entity available for tracing.
@@ -342,6 +349,7 @@ struct etmv4_drvdata { struct coresight_device *csdev; spinlock_t spinlock; local_t mode;
- u32 etm_options; int cpu; u8 arch; u8 nr_pe;
==============
Thanks -Bharat
> -----Original Message----- > From: Leo Yan leo.yan@linaro.org > Sent: Tuesday, November 5, 2019 4:38 PM > To: Bharat Bhushan bbhushan2@marvell.com > Cc: Coresight ML coresight@lists.linaro.org > Subject: [EXT] Re: perf: user-space trace decoding > > External Email > > ------------------------------------------------------------ > ---- > ---- > -- > Hi Bharat, > > > > On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan
wrote:
> > > Hi All, > > > > > > Linux h/w trace decoding is working as expected but > > user-space trace > decoding not showing sybmols (dump raw trace shows h/w trace > info) of user-space application/libraries. > > > > > > Here is how I am using: > > > > > > 1) Kernel trace > > > => perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 > > uname > > > > > > => tar czf cs_example.tgz perf.data .debug > > > > > > Transfer cs_example.tgz on x86 machine, untar, copy > > .debug in ~/ (home) > > > => perf report --vmlinux=./vmlinux > > > > > > # Samples: 937 of event 'branches:k' > > > # Event count (approx.): 937 > > > # > > > # Children Self Command Shared Object Symbol > > > # ........ ........ ....... .................
..............................................
> > > # > > > 15.58% 15.58% swapper [kernel.kallsyms] [k] __delay > > > 8.54% 8.54% swapper [kernel.kallsyms] [k] > arch_counter_get_cntpct > > > 3.31% 3.31% swapper [kernel.kallsyms] [k] > event_sched_in.isra.37 > > > 2.67% 2.67% swapper [kernel.kallsyms] [k]
group_sched_in
> > > 2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle > > > 2.35% 2.35% swapper [kernel.kallsyms] [k] > perf_event_update_userpage > > > 2.24% 2.24% swapper [kernel.kallsyms] [k] > clocks_calc_mult_shift > > > > > > 2) User-space trace > > > > > > => perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 > > uname > > > > I verified this command on DB410c, it can record and report well. > > > > > => tar czf cs_example.tgz perf.data .debug > > > > > > Transfer cs_example.tgz on x86 machine, untar, copy > > .debug in ~/ > (home) > > > => perf report > > > Error: > > > The perf.data data has no samples! > > > # To display the perf.data header info, please > > use > > --header/--header- > only options. > > > # > > > But if dump raw trace then I can see ISYNC/ATOM > > packets > > > > One potential reason is perf cannot find the correct DSO file. > Could > > you use below command to output more verbose log? > > > > # perf --debug verbose=10 report --stdio > > perf_report_dbg.log > > > > Maybe can find more hints for this failure. > > > > Thanks, > > Leo Yan > > > > > => perf report --dump > > > . ... CoreSight ETM Trace data: size 25960 bytes > > > Idx:24; ID:12; I_ASYNC : Alignment Synchronisation. > > > Idx:36; ID:12; I_TRACE_INFO : Trace Info.; > > INFO=0x0 > > > Idx:39; ID:12; I_TRACE_ON : Trace On. > > > Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: > > AArch64,EL2, NS; > CID=0x00000000; > > > Idx:46; ID:12; I_TRACE_ON : Trace On. > > > Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: > > AArch64,EL0, NS; > CID=0x00000000; > > > Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 > > bit, IS0.; > Addr=0x0000FFFF801CCF7C; > > > Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N > > > Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated > > val = > 0xede4824ce5 > > > . . . > > > > > > Any idea what I am missing. > > > > > > Thanks > > > -Bharat > > > _______________________________________________ > > > CoreSight mailing list > > > CoreSight@lists.linaro.org > > > https://urldefense.proofpoint.com/v2/url?u=https- >
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
> R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m
=
>
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g-
> N02AMoUehx2BriCCEbr9VPmuaDw&e=
CoreSight mailing list CoreSight@lists.linaro.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro. org_
mailman_listinfo_coresight&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=P
AAlWsw
Pe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrH
nfjOr99WId
oBnEkbzYFcwc&s=jHuu9gSD-
LeOv0dKLThWRZwwcY1_1CgcU5FBtLFxZoc&e=
On Wed, 6 Nov 2019 at 08:34, Bharat Bhushan bbhushan2@marvell.com wrote:
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Wednesday, November 6, 2019 8:53 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 23:10, Bharat Bhushan bbhushan2@marvell.com wrote:
Hello,
First of all I am sorry, I was supposed to run "./perf" while I was running
"perf" when taking output "perf --debug verbose=10 report --stdio > perf_report_dbg.log"
I am attaching the output of " perf --debug verbose=10 report --stdio >
perf_report_dbg.log"
A thought just struck me this morning... Aren't you dealing with a 1:1 source/sink topology in your design?
Yes, 1 core - 1 ETM and 1 ETR. Device tree is used for defining source<->sink relation.
Do you think the issue I am facing (kernel tracing working while user-space tracing with raw dump also working, and user-space not showing symbols) have relation with 1:1 source/sink.
Yes definitely - and I gave ample warnings about this situation before. In light of this I wouldn't even consider kernel space trace to be valid.
The current CS solution is not tailored to handle a 1:1 topology and will demand serious refactoring before it can do so. For each of the features we added careful consideration were taken to provision for 1:1 topologies but our efforts remain theoretical due to the lack of HW to test on.
Mathieu
Thanks -Bharat
Thanks -Bharat
-----Original Message----- From: Mathieu Poirier mathieu.poirier@linaro.org Sent: Tuesday, November 5, 2019 10:21 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, 5 Nov 2019 at 07:07, Bharat Bhushan
wrote:
Hello,
I will look in more details in code you mentioned.
Yes, I think this is the right thing to do. I'm pretty sure function cs_etm__process_auxtrace_info() is finding something it doesn't like. Why it works for kernel traces but not user space trace is puzzling though. Usually it is the other way around.
I've also seen problems such as this one when the decoder can't lookup the address of the instructions being decoded in
cs_etm__mem_access[1].
There may be several problems here and it is very likely you will have to trace a fair amount of code to find the root cause of the issue(s).
[1]. https://urldefense.proofpoint.com/v2/url?u=https- 3A__elixir.bootlin.com_linux_latest_source_tools_perf_util_cs-2Detm. c-
23L634&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGb
CLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrHnfjOr99WId
oBnEkbzYFcwc&s=RZ-
L4pyrmAq8F60e8nxlhIGBYchDeSEPVWKMv1_Ortc&e=
While below is the Auxtrace info:
. 0000: 46 00 00 00 00 00 70 00 03 00 00 00 00 00 00 00 F.....p......... . 0010: 00 00 00 00 00 00 00 00 01 00 00 00 07 00 00 00 ................ . 0020: 00 00 00 00 00 00 00 00 40 40 40 40 40 40 40 40 ........@@@@@@@@ . 0030: 01 00 00 00 00 00 00 00 40 08 00 00 00 00 00 00
........@.......
. 0040: 12 00 00 00 00 00 00 00 01 02 00 26 00 00 00 00 ...........&.... . 0050: 30 f4 00 43 00 00 00 00 88 10 00 20 00 00 00 00 0ô.C....... .... . 0060: 00 00 00 00 00 00 00 00 cc 00 00 00 00 00 00 00 ........Ì.......
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 700000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 26000201 TRCIDR1 4300f430 TRCIDR2 20001088 TRCIDR8 0 TRCAUTHSTATUS cc
Thanks -Bharat
-----Original Message----- From: Leo Yan leo.yan@linaro.org Sent: Tuesday, November 5, 2019 7:03 PM To: Bharat Bhushan bbhushan2@marvell.com Cc: Coresight ML coresight@lists.linaro.org Subject: Re: [EXT] Re: perf: user-space trace decoding
On Tue, Nov 05, 2019 at 12:51:24PM +0000, Bharat Bhushan wrote: > > Hello, > > Below is output of "perf --debug verbose=10 report --stdio > perf_report_dbg.log" > > It fails with type 0x70. > Is this "ignore packet header "? It should workn because > > Earlier I have seen this failing with "Reserved Packet" as h/w > was > ETM4.2 but it adds "Ignore Packet - 0x70". > Now I changed the TRCIDR1 to read out as 0x4.3 (git diff in > the end). Maybe I missed something.
[...]
> 0x178 [0x70]: failed to process type: 70 > Error: > failed to process sample
It should be related with auxtrace info handling.
We can use 'perf script -D' to dump related info, e.g. I can see auxtrace info as below for CoreSight:
# perf script -D
[...]
0 0 0x178 [0x70]: PERF_RECORD_AUXTRACE_INFO type: 3 Header version 0 PMU type/num cpus 900000001 Snapshot 0 Magic number 4040404040404040 CPU 1 TRCCONFIGR 840 TRCTRACEIDR 12 TRCIDR0 28000ea1 TRCIDR1 4100f400 TRCIDR2 488 TRCIDR8 0 TRCAUTHSTATUS cc
I looked the code, but cannot narrow down the issue. But I think the error might be caused by wrongly handle meta data (in the function cs_etm_info_fill(), file tools/perf/arch/arm/util/cs-etm.c) or the error in auxtrace info handling (in function cs_etm__process_auxtrace_info(), file tools/perf/util/cs-etm.c).
Thanks, Leo Yan
> bharat@bharat-OptiPlex-3070:~/trace$ > > > ======= > > diff --git > a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > index 219c10eb752c..afbdba22eb2a 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > @@ -2076,6 +2076,17 @@ static u32 etmv4_cross_read(const > struct device *dev, u32 offset) > * accessing the ETMv4 trace core registers > */ > smp_call_function_single(drvdata->cpu, do_smp_cross_read, > ®, 1); > + > + /* > + * OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet > + * feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible. > + */ > + if ((offset == TRCIDR1) && > + (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43)) { > + reg.data &= ~0xF0; > + reg.data |= 0x30; > + } > + > return reg.data; > } > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c > b/drivers/hwtracing/coresight/coresight-etm4x.c > index 6296837ca00d..ada87018317b 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x.c > @@ -625,6 +625,16 @@ static void etm4_init_arch_data(void > *info) > > /* base architecture of trace unit */ > etmidr1 = readl_relaxed(drvdata->base + TRCIDR1); > + > + /* > + * OcteonTx2 h/w reports ETMv4.2 but it supports Ignore Packet > + * feature of ETMv4.3, Treat this h/w as ETMv4.3 compatible. > + */ > + if (drvdata->etm_options & CORESIGHT_OPTS_TREAT_ETMv43) { > + etmidr1 &= ~0xF0; > + etmidr1 |= 0x30; > + } > + > /* > * TRCARCHMIN, bits[7:4] architecture the minor version number > * TRCARCHMAJ, bits[11:8] architecture major versin number > @@ > -1115,6 +1125,10 @@ static int etm4_probe(struct amba_device > *adev, const struct amba_id *id) > if (drvdata->cpu < 0) > return drvdata->cpu; > > + /* Enable options for Silicon issues */ > + if (id->id == OCTEONTX_CN9XXX_ETM) > + drvdata->etm_options = > + CORESIGHT_OPTS_TREAT_ETMv43; > + > desc.name = devm_kasprintf(dev, GFP_KERNEL, "etm%d", >drvdata- cpu); > if (!desc.name) > return -ENOMEM; > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h > b/drivers/hwtracing/coresight/coresight-etm4x.h > index 4523f10ddd0f..b16f66be8606 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x.h > +++ b/drivers/hwtracing/coresight/coresight-etm4x.h > @@ -191,6 +191,12 @@ > #define ETM_EXLEVEL_NS_HYP BIT(14) > #define ETM_EXLEVEL_NS_NA BIT(15) > > +/* Marvell OcteonTx CN9xxx ETM HW issues */ > +#define CORESIGHT_OPTS_TREAT_ETMv43 (0x1U << 0) /* Treat
ETMv4.2
as ETMv4.3 */ > + > +/* Marvell OcteonTx CN9xxx ETM device */ > +#define OCTEONTX_CN9XXX_ETM 0x000cc210 > + > /** > * struct etmv4_config - configuration information related to an
ETMv4
> * @mode: Controls various modes supported by this ETM. > @@ -287,6 +293,7 @@ struct etmv4_config { > * @csdev: Component vitals needed by the framework. > * @spinlock: Only one at a time pls. > * @mode: This tracer's mode, i.e sysFS, Perf or disabled. > + * @etm_options: Bitmask of options to manage ETMv4 Silicon > + issues > * @cpu: The cpu this component is affined to. > * @arch: ETM version number. > * @nr_pe: The number of processing entity available for tracing. > @@ -342,6 +349,7 @@ struct etmv4_drvdata { > struct coresight_device *csdev; > spinlock_t spinlock; > local_t mode; > + u32 etm_options; > int cpu; > u8 arch; > u8 nr_pe; > > ============== > > Thanks > -Bharat > > > -----Original Message----- > > From: Leo Yan leo.yan@linaro.org > > Sent: Tuesday, November 5, 2019 4:38 PM > > To: Bharat Bhushan bbhushan2@marvell.com > > Cc: Coresight ML coresight@lists.linaro.org > > Subject: [EXT] Re: perf: user-space trace decoding > > > > External Email > > > > ------------------------------------------------------------ > > ---- > > ---- > > -- > > Hi Bharat, > > > > > > > > On Tue, Nov 05, 2019 at 08:30:25AM +0000, Bharat Bhushan
wrote:
> > > > > Hi All, > > > > > > > > > > Linux h/w trace decoding is working as expected but > > > user-space trace > > decoding not showing sybmols (dump raw trace shows h/w trace > > info) of user-space application/libraries. > > > > > > > > > > Here is how I am using: > > > > > > > > > > 1) Kernel trace > > > > > => perf record -C 1 -e cs_etm/@tmc_etr1/k taskset 0x2 > > > uname > > > > > > > > > > => tar czf cs_example.tgz perf.data .debug > > > > > > > > > > Transfer cs_example.tgz on x86 machine, untar, copy > > > .debug in ~/ (home) > > > > > => perf report --vmlinux=./vmlinux > > > > > > > > > > # Samples: 937 of event 'branches:k' > > > > > # Event count (approx.): 937 > > > > > # > > > > > # Children Self Command Shared Object Symbol > > > > > # ........ ........ ....... .................
..............................................
> > > > > # > > > > > 15.58% 15.58% swapper [kernel.kallsyms] [k] __delay > > > > > 8.54% 8.54% swapper [kernel.kallsyms] [k] > > arch_counter_get_cntpct > > > > > 3.31% 3.31% swapper [kernel.kallsyms] [k] > > event_sched_in.isra.37 > > > > > 2.67% 2.67% swapper [kernel.kallsyms] [k]
group_sched_in
> > > > > 2.56% 2.56% swapper [kernel.kallsyms] [k] do_idle > > > > > 2.35% 2.35% swapper [kernel.kallsyms] [k] > > perf_event_update_userpage > > > > > 2.24% 2.24% swapper [kernel.kallsyms] [k] > > clocks_calc_mult_shift > > > > > > > > > > 2) User-space trace > > > > > > > > > > => perf record -C 1 -e cs_etm/@tmc_etr1/u taskset 0x2 > > > uname > > > > > > > > I verified this command on DB410c, it can record and report well. > > > > > > > > > => tar czf cs_example.tgz perf.data .debug > > > > > > > > > > Transfer cs_example.tgz on x86 machine, untar, copy > > > .debug in ~/ > > (home) > > > > > => perf report > > > > > Error: > > > > > The perf.data data has no samples! > > > > > # To display the perf.data header info, please > > > use > > > --header/--header- > > only options. > > > > > # > > > > > But if dump raw trace then I can see ISYNC/ATOM > > > packets > > > > > > > > One potential reason is perf cannot find the correct DSO file. > > Could > > > > you use below command to output more verbose log? > > > > > > > > # perf --debug verbose=10 report --stdio > > > perf_report_dbg.log > > > > > > > > Maybe can find more hints for this failure. > > > > > > > > Thanks, > > > > Leo Yan > > > > > > > > > => perf report --dump > > > > > . ... CoreSight ETM Trace data: size 25960 bytes > > > > > Idx:24; ID:12; I_ASYNC : Alignment Synchronisation. > > > > > Idx:36; ID:12; I_TRACE_INFO : Trace Info.; > > > INFO=0x0 > > > > > Idx:39; ID:12; I_TRACE_ON : Trace On. > > > > > Idx:40; ID:12; I_CTXT : Context Packet.; Ctxt: > > > AArch64,EL2, NS; > > CID=0x00000000; > > > > > Idx:46; ID:12; I_TRACE_ON : Trace On. > > > > > Idx:47; ID:12; I_CTXT : Context Packet.; Ctxt: > > > AArch64,EL0, NS; > > CID=0x00000000; > > > > > Idx:53; ID:12; I_ADDR_L_64IS0 : Address, Long, 64 > > > bit, IS0.; > > Addr=0x0000FFFF801CCF7C; > > > > > Idx:62; ID:12; I_ATOM_F1 : Atom format 1.; N > > > > > Idx:63; ID:12; I_TIMESTAMP : Timestamp.; Updated > > > val = > > 0xede4824ce5 > > > > > . . . > > > > > > > > > > Any idea what I am missing. > > > > > > > > > > Thanks > > > > > -Bharat > > > > > _______________________________________________ > > > > > CoreSight mailing list > > > > > CoreSight@lists.linaro.org > > > > > https://urldefense.proofpoint.com/v2/url?u=https- > >
3A__lists.linaro.org_mailman_listinfo_coresight&d=DwIBAg&c=nKjWec2b6
> > R0
mOyPaz7xtfQ&r=PAAlWswPe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m
=
> >
GZeDPhs62scs3v9Csh9IZRB6pw8UMJYewwhrv_U5xpc&s=ezH1P6fe2-
wWc8g- > > N02AMoUehx2BriCCEbr9VPmuaDw&e= >
CoreSight mailing list CoreSight@lists.linaro.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro. org_
mailman_listinfo_coresight&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=P
AAlWsw
Pe7d8gHlGbCLmy2YezyK7O3Hv_t2heGnouBw&m=xzqQHPtXHXIolLyGp6WrH
nfjOr99WId
oBnEkbzYFcwc&s=jHuu9gSD-
LeOv0dKLThWRZwwcY1_1CgcU5FBtLFxZoc&e=