Commit Graph

20 Commits

Author SHA1 Message Date
Khem Raj
4d6f772ff1
perfetto: Use gn from native sysroot
Prebuilts shipped with sources is a x86_64 binary which works ok
on x86_64 build hosts, but we do have arm64 hosts quite commonly
used to build OE these days, where this fails miserably. Therefore
use the gn from gn-native, so we can get it targtted correctly for
build host architecture.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
2025-10-02 10:17:48 -07:00
Etienne Cordonnier
ab5cd440b3
perfetto: enabled traced_perf by compiling with clang
traced_perf is required for using e.g. callstack_sampling, see https://perfetto.dev/docs/getting-started/cpu-profiling

Tested on qemu:

Starting perfetto using a configuration which uses `callstack_sampling` starts traced_perf as a side-effect when perfetto is compiled with clang:

```
root@qemux86-64:~#  tracebox --txt -c /tmp/config.pbtxt -o /tmp/perfetto-trace.pb &
root@qemux86-64:~# ps -eo pid,cmd | grep tracebox
  529 tracebox --txt -c /tmp/config.pbtxt -o /tmp/perfetto-trace.pb
  530 /usr/bin/tracebox traced
  533 /usr/bin/tracebox traced_probes --reset-ftrace
  536 /usr/bin/tracebox traced_perf
```

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-08-18 07:50:01 -07:00
Etienne Cordonnier
1b2ebce563
perfetto: upgrade 47.0 -> 51.2
Release Notes: https://github.com/google/perfetto/releases/tag/v51.2

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-08-18 07:50:01 -07:00
Alexander Kanavin
fc78d37ff0
meta-openembedded/all: adapt to UNPACKDIR changes
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.

I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-25 06:44:52 -07:00
mark.yang
8afcf6a70d
perfetto: fix error with gcc-15
* Backport fix from:
    3953f56f98
  * To fix the error with gcc-15.
  http://errors.yoctoproject.org/Errors/Details/851189/
    ../git/include/perfetto/ext/tracing/core/slice.h:47:46: error: 'uint8_t' was not declared in this scope
    47 |   static Slice TakeOwnership(std::unique_ptr<uint8_t[]> buf, size_t size) {
        |                                              ^~~~~~~
    ../git/include/perfetto/ext/tracing/core/slice.h:25:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    24 | #include <string>
    +++ |+#include <cstdint>

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-10 08:31:03 -07:00
Richard Purdie
eac1f5b9c0
recipes: Fix variable assignment whitespace
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-03-20 08:46:56 -07:00
Martin Jansa
b7a096064b
perfetto: drop unnecessary FILESEXTRAPATHS
* we already have a common directory in default FILESPATH called 'files'

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-31 08:13:24 -07:00
Etienne Cordonnier
a2bd05f9ec perfetto: upgrade 31.0 -> 47.0
Release Notes: https://github.com/google/perfetto/releases/tag/v47.0

Test procedure:
Tested with TOOLCHAIN="clang" and MACHINE="qemux86-64" (using ARGS="is_debug=false enable_perfetto_x64_cpu_opt=false" in perfetto.bb because of missing SSE4.2,BMI2,AVX2 inside qemu):

```
root@qemux86-64:~# tracebox --out /tmp/perfetto dmesg sched freq idle am wm gfx view binder_driver hal dalvik camera input res memory
[100.634]          service.cc:232 Started traced, listening on @traced-p-310 @traced-c-310
[100.804]           probes.cc:104 Starting traced_probes service
[100.852]  probes_producer.cc:332 Connected to the service
[100.957]   perf_producer.cc:1201 Connected to the service
[100.979]    perfetto_cmd.cc:1100 Connected to the Perfetto traced service, TTL: 10s
[101.029] ng_service_impl.cc:1125 Configured tracing session 1, #sources:4, duration:10000 ms, #buffers:1, total buffer size:32768 KB, total sessions:1, uid:0 session name: ""
[101.571]  probes_producer.cc:132 Ftrace setup (target_buf=1)
[101.574]    ftrace_procfs.cc:441 disabled ftrace in /sys/kernel/tracing/
[101.679]    ftrace_procfs.cc:295 Failed to setup event triggers for synthetic:rss_stat_throttled (errno: 22, Invalid argument)
[101.682]   atrace_wrapper.cc:196 Atrace only supported on Android.
[101.757]    ftrace_procfs.cc:438 enabled ftrace in /sys/kernel/tracing/
[111.091] ng_service_impl.cc:2103 FlushAndDisableTracing(1) done, success=1
[111.097]  probes_producer.cc:445 Producer stop (id=1)
[111.168]    ftrace_procfs.cc:441 disabled ftrace in /sys/kernel/tracing/
[111.181]    ftrace_procfs.cc:441 disabled ftrace in /sys/kernel/tracing/
[111.194]  probes_producer.cc:445 Producer stop (id=2)
[111.200]  probes_producer.cc:445 Producer stop (id=3)
[111.308]    perfetto_cmd.cc:1263 Wrote 390764 bytes into /tmp/perfetto

root@qemux86-64:~# ls -l /tmp/perfetto
-rw------- 1 root root 390764 Sep 24 09:25 /tmp/perfetto
```
I then manually verified the file using https://ui.perfetto.dev/

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-09-26 06:58:28 -07:00
alperak
cede104355
perfetto: Fix contains reference to TMPDIR [buildpaths] warning
WARNING:perfetto-31.0-r0 do_package_qa: QA Issue: File /usr/bin/.debug/tracebox in package perfetto-dbg contains reference to TMPDIR [buildpaths]

Signed-off-by: alperak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-09 14:25:26 -07:00
Khem Raj
403938ce85 perfetto: Add SRCREV_FORMAT
Recipe uses multiple SRC_URIs therefore its required to define
SRCREV_FORMAT so it can fetch on changes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-08-11 09:36:03 -07:00
Martin Jansa
be8c765c7c *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:

5 (26%) 	meta-xfce
6 (50%) 	meta-perl
15 (42%)        meta-webserver
21 (36%)        meta-gnome
25 (57%)        meta-filesystems
26 (43%)        meta-initramfs
45 (45%)        meta-python
47 (55%)        meta-multimedia
312 (63%)       meta-networking
756 (61%)       meta-oe

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-21 09:15:20 -07:00
Khem Raj
b67a20e35a perfetto: Fix build on musl again
Update to 0.31 broke build on musl. New dependencies mean additional
fixes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-06 20:48:39 -08:00
Khem Raj
71d152d23c perfetto: Add missing dependencies.
Latest release 0.31 needs some more bits during build. Add them
at right SHA checkouts, from

tools/install-build-deps

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-05 09:55:10 -08:00
Khem Raj
1b7fd40fb3 perfetto: Fix build with gcc13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-01 09:11:49 -08:00
Khem Raj
71d2adfc5f perfetto: Upgrade to 31.0 release
Forward port pc file patch to 0.31 release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-01 09:11:49 -08:00
Khem Raj
7f456b1f00 perfetto: Disable ccache
It does not build with ccache for some reason, loses the compiler name

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-29 21:09:39 -08:00
Khem Raj
90ea68fc11 perfetto: Do not pass TUNE_CCARGS to native/host compiler
TUNE_CCARGS are meant to be passed to target compilers only. This fixes
build failures seen on qemux6

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Markus Volk <f_l_k@t-online.de>
2022-12-08 17:10:48 -08:00
Markus Volk
c23bde86d0 perfetto: pass TUNE_CCARGS to use machine tune
We already tried to pass -mfloat-abi=hard if the machine can use it, but since
no floating-point-unit was defined it got stubbed out and the result was, that
only arm targets configured for softfp were able to build perfetto.

Simplify by passing ${TUNE_CCARGS} to ensure, we always use the features, the
machine was configured for.

Also, do not use sed to remove the hardcoded -mfpu=neon entry. If this really
turns out to be problematic, we need to patch it out to avoid not having a
floating-point-unit again.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-05 09:16:24 -08:00
Markus Volk
a067e1ba94 perfetto: build libperfetto
- Mesa has support for perfetto, but the libperfetto library is needed
- Only v27 seems to be supported for now. Update perfetto accordingly
- Make sure perfetto and libperfetto share the same codebase
- Patch meson.build to allow shared build
  - Add a version number to avoid having a non symlink so file packaged into dev package
  - Create a PC file for libperfetto to allow mesa to find it using pkgconfig
  - Install needed header file
- Add -latomic to LDFLAGS for some arch where the compiler doesn't provide it

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-10-18 16:25:44 -07:00
Sui Chen
8073ec2275 Add recipe for Perfetto
Perfetto (https://perfetto.dev/) is a system profiling, app tracing
and trace analysis framework.

We started using Perfetto for studying a few performance-related
problems for OpenBMC-based systems (both the BMC and the host)
and we feel it would be good if Perfetto is included into
OpenEmbedded, since embedded systems are usually expected to have
predictable performance characteristics, and having a good set of
performance analysis tools would make this work easier.

Tested: bitbake compile, devtool extract and override

Signed-off-by: Sui Chen <suichen6@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-10-18 11:49:35 -07:00