As we transition to perfetto, there are more efficient ways
of adding metadata to traces that we can use when it is
needed.
Signed-off-by: John Bates <jbates@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Most of the time we pass a string that can simply be forwarded to
the perfetto trace function.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> (v1)
v2: - Include perfetto_min.h only when perf tracing is enabled
- Make stubs inline code so it can be optimized away.
- Add compile with tracing info to configuration status
- Use static for stubs (Chia-I Wu)
- pass trace option as a string and add defines so that
other tracing tools cold be accomodated
(inspired by Chia-I Wu & Tomeu)
- Use macros to wrap the trace calls
v3: - Use __attribute__((cleanup)) to handle trace_begin/trace_end
instead of using macros to wrap the calls (Chia-I Wu)
- remove cpp from language support
v4: - Fix __attribute__ check in meson.build
- replace TRACE_FUNC macro to not take a paramter
- move trace initialization to a seperate function
(all suggestions by Chia-I Wu)
v5: use vsnprintf to avoid buffer overflow (John Bates)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> (v4)
So that it can be shared by different renderers (there is only vrend
right now).
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Rename vrend_util.h to virgl_util.h. Add the header guard.
"vrend" is the prefix for the GL renderer code. "virgl" is the
prefix for common code.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
For random stuff not in src/util.h
util_bitmask is too heavyweight for what I was looking for.
v2: Make macros return 0 or 1 (@davidriley)
v3: static inline macros (@gerddie)
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Turns out some files managed to have a mix between 2, 3, 4 and tabs for
indenting. The only way to really fix this was to do just a single commit
that fixes all of them.
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
For the same glmark2 "build" test, perf reports about half
instructions.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
The idea is to have a unix socket and possible shmem protocol
between a renderering server and local gallium sw driver.
This could be used to validate virgl without qemu with piglit.