From e929e0de68df781bef11e3c14d11e76c1529dc18050893a7f8bdb59e845d26d0 Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Fri, 14 Mar 2025 08:31:39 +0000 Subject: [PATCH] - Use pkgconfig() to make BuildRequires impervious to name changes. OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/gpuvis?expand=0&rev=10 --- .gitattributes | 23 +++++ .gitignore | 1 + ...is_macro.h-needs-to-include-stdint.h.patch | 26 ++++++ gpuvis.changes | 83 +++++++++++++++++++ gpuvis.spec | 65 +++++++++++++++ gpuvis.tar.gz | 3 + 6 files changed, 201 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-gpuvis_macro.h-needs-to-include-stdint.h.patch create mode 100644 gpuvis.changes create mode 100644 gpuvis.spec create mode 100644 gpuvis.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-gpuvis_macro.h-needs-to-include-stdint.h.patch b/0001-gpuvis_macro.h-needs-to-include-stdint.h.patch new file mode 100644 index 0000000..359f021 --- /dev/null +++ b/0001-gpuvis_macro.h-needs-to-include-stdint.h.patch @@ -0,0 +1,26 @@ +From df6faf200282f078605c920eae888b3f1ab0dfc6 Mon Sep 17 00:00:00 2001 +From: Patrik Jakobsson +Date: Fri, 24 Mar 2023 10:57:24 +0100 +Subject: [PATCH] gpuvis_macro.h needs to include stdint.h + +Signed-off-by: Patrik Jakobsson +--- + src/gpuvis_macros.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/gpuvis_macros.h b/src/gpuvis_macros.h +index 9a6974c..3574dbd 100644 +--- a/src/gpuvis_macros.h ++++ b/src/gpuvis_macros.h +@@ -24,6 +24,8 @@ + #ifndef GPUVIS_MACROS_H_ + #define GPUVIS_MACROS_H_ + ++#include ++ + // Disable gpuvis ftrace tracing by default + #define GPUVIS_TRACE_UTILS_DISABLE + #include "../sample/gpuvis_trace_utils.h" +-- +2.40.0 + diff --git a/gpuvis.changes b/gpuvis.changes new file mode 100644 index 0000000..875d7ee --- /dev/null +++ b/gpuvis.changes @@ -0,0 +1,83 @@ +------------------------------------------------------------------- +Thu Mar 13 18:26:04 UTC 2025 - Jan Engelhardt + +- Use pkgconfig() to make BuildRequires impervious to name changes. + +------------------------------------------------------------------- +Tue Feb 27 11:16:55 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN. + +------------------------------------------------------------------- +Fri Mar 24 10:21:40 UTC 2023 - Patrik Jakobsson + +- Update to version 20230221 (a0ca7a9d4a126f0ad382699010cdf15562afc307) + * Fix compilation with latest version of igt + * Fix build using meson and not vendor rapidjson + * 0001-gpuvis_macro.h-needs-to-include-stdint.h.patch Fix compile error + +------------------------------------------------------------------- +Thu Jan 27 16:28:02 UTC 2022 - Patrik Jakobsson + +- Update to version v0.1 (first proper release) + * Minor fixes to compile/link on Windows. + * Fix includes for GCC 7 + * typo prevents execution + * Fix some unchecked error codes from asprintf (warnings->errors in gcc7) + * Don't rely on trace-cmd to mount at /sys/kernel/tracing if tracefs is + * Fix some potential null pointer dereferences + * gpuvis_trace_utils: Prefer C++11 thread_local vs. __thread + * gpuvis_trace_utils: Add 'static' to gpuvis_gettime_u64 + * Add a parser that can handle ETW files (extension is etl) + * Support for ETL gpu events + * Fixups for the ETL parser + * fix compilation on non-windows + * fix sdl2-config argument + * Include headers for stub compilation + * Update SteamVR provider GUID + * Trace block macro c + * Add 'ltime=' print param to inject event timestamp + * Allow hash of arbitrary ctx/ringno/seqno + * Use high-precision vblank timings, if available + * Integrate i915-perf data into GPUvis by + * Plot generic trace events and option to plot as step function + * Add support for importing generic DRM sched timing events. + * i915-perf fixes for Makefile by + * Hide intel GPU generated event row when we don't have any + * I915 perf updates + * Run trace-cmd-status.sh script from scripts location + * Don't die() when an unknown trace-cmd options is encountered + * Allow dtime= on events to tweak their offset. + * Don't try to access i915-perf data if no file was given + * i915-perf: add GPU frequency plot + * add meson build system + * trace-read: Fix high-prec vblank timestamps + * i915-perf: set a different default colors to GPU timeline events + * meson: remove python2 + * Add loading of Linux perf JSON + * Better i915-perf / tracepoint tracking + * Improve archive handling + * Enable Shortcut for gpuvis Desktop Application + +------------------------------------------------------------------- +Fri Dec 10 10:41:06 UTC 2021 - Patrik Jakobsson + +- Update to version 20211204 (7f47419470687c7ecbdf086b81f5bafdb05d1bef) + * Look at all buffers when calculating min_file_ts + +------------------------------------------------------------------- +Fri Dec 10 09:48:27 UTC 2021 - Patrik Jakobsson + +- Only build with intel-gpu-tools-devel on suse_version > 1530 +- Only build with i915_perf=true on x86* + +------------------------------------------------------------------- +Wed Nov 24 12:34:12 UTC 2021 - Patrik Jakobsson + +- Add a proper description + +------------------------------------------------------------------- +Wed Nov 24 12:28:13 UTC 2021 - Patrik Jakobsson + +- Initial version 20211124 (commit ff96f19529021991e6cbcc81f026bca658897bd8) diff --git a/gpuvis.spec b/gpuvis.spec new file mode 100644 index 0000000..28b58fe --- /dev/null +++ b/gpuvis.spec @@ -0,0 +1,65 @@ +# +# spec file for package gpuvis +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define commit a0ca7a9d4a126f0ad382699010cdf15562afc307 + +Name: gpuvis +Version: 20230221 +Release: 0 +Summary: GPU Trace Visualizer +License: MIT +Group: Development/Tools/Debuggers +URL: https://github.com/mikesart/gpuvis +Source0: https://github.com/mikesart/gpuvis/archive/%{commit}/gpuvis.tar.gz +Patch0: 0001-gpuvis_macro.h-needs-to-include-stdint.h.patch +BuildRequires: gcc-c++ +BuildRequires: meson +BuildRequires: ninja +BuildRequires: pkgconfig(RapidJSON) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(sdl2) +%ifarch %{ix86} x86_64 +%if 0%{?suse_version} > 1530 +BuildRequires: pkgconfig(i915-perf) +%endif +%endif + +%description +Gpuvis is a Linux GPU profiler similar to GPUView on Windows. It is designed to work with trace-cmd captures and help track down Linux gpu and application performance issues. + +%prep +%autosetup -p1 -n gpuvis-%{commit} + +%build +%meson \ +%ifarch %{ix86} x86_64 +%if 0%{?suse_version} > 1530 + -Duse_i915_perf=true +%endif +%endif + +%meson_build + +%install +%meson_install + +%files +%{_bindir}/gpuvis + +%changelog diff --git a/gpuvis.tar.gz b/gpuvis.tar.gz new file mode 100644 index 0000000..1083ed1 --- /dev/null +++ b/gpuvis.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:044425845a32dae13aae767e8e920319fc45a10ed246a17a3ce4507cc3d87ee3 +size 5151949 -- 2.51.1