All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs
@ 2019-12-27 16:23 Robert M. Fosha
  2019-12-27 16:34 ` Chris Wilson
  2019-12-27 16:40 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Robert M. Fosha @ 2019-12-27 16:23 UTC (permalink / raw)
  To: igt-dev; +Cc: Tvrtko Ursulin

With discrete graphics system can have both integrated and discrete GPU
handled by i915.

Update path to PMU for non-integrated devices to include PCI device name
string to match driver implementation. Integrated devices keep legacy
path.

Signed-off-by: Robert M. Fosha <robert.m.fosha@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 lib/igt_perf.c    | 53 ++++++++++++++++++++++++++++++++++++++++++++---
 tools/meson.build |  2 +-
 2 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/lib/igt_perf.c b/lib/igt_perf.c
index e3dec2cc..f4a0036f 100644
--- a/lib/igt_perf.c
+++ b/lib/igt_perf.c
@@ -5,27 +5,74 @@
 #include <string.h>
 #include <errno.h>
 #include <sys/sysinfo.h>
+#include <sys/stat.h>
 
 #include "igt_perf.h"
 
+#include "drmtest.h"
+#include "igt_debugfs.h"
+
+static char *perf_event_sysfs_path(void)
+{
+	int drm_fd;
+	static const char unique[] = "unique=";
+	static const char prefix[] = "/sys/bus/event_source/devices/i915";
+	char path[100];
+	char buf[100];
+	char *busid;
+	struct stat st;
+
+	drm_fd = drm_open_driver(DRIVER_INTEL);
+	igt_debugfs_read(drm_fd, "name", buf);
+	close(drm_fd);
+
+	strtok(buf, "\n");
+
+	busid = strstr(buf, unique);
+	if (!busid || strlen(busid) <= strlen(unique))
+		goto err_path;
+
+	busid += strlen(unique);
+	snprintf(path, sizeof(path), "%s-%s/type", prefix, busid);
+	if (stat(path, &st) || !S_ISREG(st.st_mode))
+		goto err_path;
+
+	return strndup(path, sizeof(path));
+
+err_path:
+	snprintf(path, sizeof(path), "%s/type", prefix);
+	return strndup(path, sizeof(path));
+
+}
+
 uint64_t i915_type_id(void)
 {
+	char *type_path;
 	char buf[64];
 	ssize_t ret;
 	int fd;
 
-	fd = open("/sys/bus/event_source/devices/i915/type", O_RDONLY);
+	type_path = perf_event_sysfs_path();
+	if (type_path == NULL)
+		goto err_type_id;
+
+	fd = open(type_path, O_RDONLY);
 	if (fd < 0)
-		return 0;
+		goto err_type_id;
 
 	ret = read(fd, buf, sizeof(buf) - 1);
 	close(fd);
 	if (ret < 1)
-		return 0;
+		goto err_type_id;
 
 	buf[ret] = '\0';
 
+	free(type_path);
 	return strtoull(buf, NULL, 0);
+
+err_type_id:
+	free(type_path);
+	return 0;
 }
 
 static int
diff --git a/tools/meson.build b/tools/meson.build
index 74822a33..c71a3ed2 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -99,7 +99,7 @@ shared_library('intel_aubdump', 'aubdump.c',
 executable('intel_gpu_top', 'intel_gpu_top.c',
 	   install : true,
 	   install_rpath : bindir_rpathdir,
-	   dependencies : lib_igt_perf)
+	   dependencies : [ igt_deps, lib_igt_perf ])
 
 executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
 	   dependencies : [tool_deps],
-- 
2.21.0.5.gaeb582a983

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs
  2019-12-27 16:23 [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs Robert M. Fosha
@ 2019-12-27 16:34 ` Chris Wilson
  2019-12-27 16:42   ` Chris Wilson
  2019-12-27 16:40 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2019-12-27 16:34 UTC (permalink / raw)
  To: Robert M. Fosha, igt-dev; +Cc: Tvrtko Ursulin

Quoting Robert M. Fosha (2019-12-27 16:23:12)
> With discrete graphics system can have both integrated and discrete GPU
> handled by i915.
> 
> Update path to PMU for non-integrated devices to include PCI device name
> string to match driver implementation. Integrated devices keep legacy
> path.
> 
> Signed-off-by: Robert M. Fosha <robert.m.fosha@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>  lib/igt_perf.c    | 53 ++++++++++++++++++++++++++++++++++++++++++++---
>  tools/meson.build |  2 +-
>  2 files changed, 51 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/igt_perf.c b/lib/igt_perf.c
> index e3dec2cc..f4a0036f 100644
> --- a/lib/igt_perf.c
> +++ b/lib/igt_perf.c
> @@ -5,27 +5,74 @@
>  #include <string.h>
>  #include <errno.h>
>  #include <sys/sysinfo.h>
> +#include <sys/stat.h>
>  
>  #include "igt_perf.h"
>  
> +#include "drmtest.h"
> +#include "igt_debugfs.h"
> +
> +static char *perf_event_sysfs_path(void)
> +{
> +       int drm_fd;
> +       static const char unique[] = "unique=";
> +       static const char prefix[] = "/sys/bus/event_source/devices/i915";
> +       char path[100];
> +       char buf[100];
> +       char *busid;
> +       struct stat st;
> +
> +       drm_fd = drm_open_driver(DRIVER_INTEL);

Just stop there. How does this relate to the device we want?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: warning for lib/igt_perf: Support multiple GPUs
  2019-12-27 16:23 [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs Robert M. Fosha
  2019-12-27 16:34 ` Chris Wilson
@ 2019-12-27 16:40 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-12-27 16:40 UTC (permalink / raw)
  To: Robert M. Fosha; +Cc: igt-dev

== Series Details ==

Series: lib/igt_perf: Support multiple GPUs
URL   : https://patchwork.freedesktop.org/series/71439/
State : warning

== Summary ==

Did not get list of undocumented tests for this run, something is wrong!

Other than that, pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/92289 for the overview.

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235612):
  [933/934] Compiling C object 'assembler/1ca89e8@@intel-gen4asm@exe/meson-generated_gram.c.o'.
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/364] Generating version.h with a custom command.
  [2/3] Linking target assembler/intel-gen4asm.
  [3/3] Linking target overlay/intel-gpu-overlay.
  FAILED: overlay/intel-gpu-overlay 
  cc  -o overlay/intel-gpu-overlay 'overlay/b4b33d2@@intel-gpu-overlay@exe/chart.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/config.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/cpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/debugfs.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-interrupts.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-objects.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-perf.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-freq.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/power.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/rc6.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_dri2.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_rgb2yuv.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-window.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_position.c.o' 'overlay/b4b33d2@@intel-gpu-overl
 ay@exe/kms_kms-overlay.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libigt_perf.a -lrt -lm /usr/lib64/libcairo.so /usr/lib64/libpciaccess.so /usr/lib64/libdrm.so /usr/lib64/libdrm_intel.so /usr/lib64/libXv.so /usr/lib64/libX11.so /usr/lib64/libXext.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/builds/gfx-ci/igt-ci-tags/build/lib
  /usr/bin/ld: lib/libigt_perf.a(igt_perf.c.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  section_end:1577464641:build_script
  ^[[0Ksection_start:1577464641:after_script
  ^[[0Ksection_end:1577464642:after_script
  ^[[0Ksection_start:1577464642:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464644:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235613):
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/364] Generating version.h with a custom command.
  [2/4] Linking target runner/runner_test.
  [3/4] Linking target assembler/intel-gen4asm.
  [4/4] Linking target overlay/intel-gpu-overlay.
  FAILED: overlay/intel-gpu-overlay 
  cc  -o overlay/intel-gpu-overlay 'overlay/b4b33d2@@intel-gpu-overlay@exe/chart.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/config.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/cpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/debugfs.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-interrupts.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-objects.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-perf.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-freq.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/power.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/rc6.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_dri2.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_rgb2yuv.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-window.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_position.c.o' 'overlay/b4b33d2@@intel-gpu-overl
 ay@exe/kms_kms-overlay.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libigt_perf.a -lrt -lm /usr/lib64/libcairo.so /usr/lib64/libpciaccess.so /usr/lib64/libdrm.so /usr/lib64/libdrm_intel.so /usr/lib64/libXv.so /usr/lib64/libX11.so /usr/lib64/libXext.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/builds/gfx-ci/igt-ci-tags/build/lib
  /usr/bin/ld: lib/libigt_perf.a(igt_perf.c.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  section_end:1577464641:build_script
  ^[[0Ksection_start:1577464641:after_script
  ^[[0Ksection_end:1577464642:after_script
  ^[[0Ksection_start:1577464642:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464644:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235614):
  [355/360] Linking target runner/runner_test.
  [356/360] Linking target runner/runner_json_test.
  [357/360] Linking static target assembler/libbrw.a.
  [358/360] Linking target assembler/intel-gen4asm.
  [359/360] Linking target assembler/intel-gen4disasm.
  [360/360] Linking target overlay/intel-gpu-overlay.
  FAILED: overlay/intel-gpu-overlay 
  cc  -o overlay/intel-gpu-overlay 'overlay/overlay@@intel-gpu-overlay@exe/chart.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/config.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/cpu-top.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/debugfs.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/gem-interrupts.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/gem-objects.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/gpu-top.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/gpu-perf.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/gpu-freq.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/overlay.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/power.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/rc6.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/x11_dri2.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/x11_rgb2yuv.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/x11_x11-overlay.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/x11_x11-window.c.o' 'overlay/overlay@@intel-gpu-overlay@exe/x11_position.c.o' 'overlay/overlay@@intel-gpu-overl
 ay@exe/kms_kms-overlay.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group lib/libigt_perf.a -lrt -lm /usr/lib64/libcairo.so /usr/lib64/libpciaccess.so /usr/lib64/libdrm.so /usr/lib64/libdrm_intel.so /usr/lib64/libXv.so /usr/lib64/libX11.so /usr/lib64/libXext.so -Wl,--end-group  
  /usr/bin/ld: lib/libigt_perf.a(igt_perf.c.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  section_end:1577464705:build_script
  ^[[0Ksection_start:1577464705:after_script
  ^[[0Ksection_end:1577464706:after_script
  ^[[0Ksection_start:1577464706:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464707:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235615):
  1 warning generated.
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/364] Generating version.h with a custom command.
  [2/3] Linking target assembler/intel-gen4asm.
  [3/3] Linking target overlay/intel-gpu-overlay.
  FAILED: overlay/intel-gpu-overlay 
  clang  -o overlay/intel-gpu-overlay 'overlay/b4b33d2@@intel-gpu-overlay@exe/chart.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/config.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/cpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/debugfs.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-interrupts.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-objects.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-perf.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-freq.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/power.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/rc6.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_dri2.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_rgb2yuv.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-window.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_position.c.o' 'overlay/b4b33d2@@intel-gpu-ov
 erlay@exe/kms_kms-overlay.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libigt_perf.a -lrt -lm /usr/lib64/libcairo.so /usr/lib64/libpciaccess.so /usr/lib64/libdrm.so /usr/lib64/libdrm_intel.so /usr/lib64/libXv.so /usr/lib64/libX11.so /usr/lib64/libXext.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/builds/gfx-ci/igt-ci-tags/build/lib
  /usr/bin/ld: lib/libigt_perf.a(igt_perf.c.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.
  section_end:1577464680:build_script
  ^[[0Ksection_start:1577464680:after_script
  ^[[0Ksection_end:1577464681:after_script
  ^[[0Ksection_start:1577464681:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464683:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235616):
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/371] Generating version.h with a custom command.
  [2/11] Linking target runner/runner_test.
  [3/11] Linking target assembler/intel-gen4asm.
  [4/11] Linking target overlay/intel-gpu-overlay.
  FAILED: overlay/intel-gpu-overlay 
  cc  -o overlay/intel-gpu-overlay 'overlay/b4b33d2@@intel-gpu-overlay@exe/chart.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/config.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/cpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/debugfs.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-interrupts.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gem-objects.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-top.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-perf.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/gpu-freq.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/power.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/rc6.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_dri2.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_rgb2yuv.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-overlay.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_x11-window.c.o' 'overlay/b4b33d2@@intel-gpu-overlay@exe/x11_position.c.o' 'overlay/b4b33d2@@intel-gpu-overl
 ay@exe/kms_kms-overlay.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group lib/libigt_perf.a -lrt -lm /usr/lib/x86_64-linux-gnu/libcairo.so /usr/lib/x86_64-linux-gnu/libpciaccess.so /usr/lib/x86_64-linux-gnu/libdrm.so /usr/lib/x86_64-linux-gnu/libdrm_intel.so /usr/lib/x86_64-linux-gnu/libXv.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/builds/gfx-ci/igt-ci-tags/build/lib  
  /usr/bin/ld: lib/libigt_perf.a(igt_perf.c.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/build/../lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  section_end:1577464662:build_script
  ^[[0Ksection_start:1577464662:after_script
  ^[[0Ksection_end:1577464663:after_script
  ^[[0Ksection_start:1577464663:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464665:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

build:tests-debian-autotools has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1235621):
  make[3]: Entering directory '/builds/gfx-ci/igt-ci-tags/tools'
    CCLD     intel_gpu_top
  /usr/bin/ld: ../lib/.libs/libigt_perf.a(igt_perf.o): in function `perf_event_sysfs_path':
  /builds/gfx-ci/igt-ci-tags/lib/igt_perf.c:25: undefined reference to `drm_open_driver'
  /usr/bin/ld: /builds/gfx-ci/igt-ci-tags/lib/igt_perf.c:26: undefined reference to `__igt_debugfs_read'
  collect2: error: ld returned 1 exit status
  make[3]: Leaving directory '/builds/gfx-ci/igt-ci-tags/tools'
  make[3]: *** [Makefile:1029: intel_gpu_top] Error 1
  make[2]: Leaving directory '/builds/gfx-ci/igt-ci-tags/tools'
  make[2]: *** [Makefile:1308: all-recursive] Error 1
  make[1]: Leaving directory '/builds/gfx-ci/igt-ci-tags'
  make[1]: *** [Makefile:514: all-recursive] Error 1
  make: *** [Makefile:446: all] Error 2
  section_end:1577464647:build_script
  ^[[0Ksection_start:1577464647:after_script
  ^[[0Ksection_end:1577464648:after_script
  ^[[0Ksection_start:1577464648:upload_artifacts_on_failure
  ^[[0Ksection_end:1577464649:upload_artifacts_on_failure
  ^[[0K^[[31;1mERROR: Job failed: exit code 1
  ^[[0;m

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/92289
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs
  2019-12-27 16:34 ` Chris Wilson
@ 2019-12-27 16:42   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-12-27 16:42 UTC (permalink / raw)
  To: Robert M. Fosha, igt-dev; +Cc: Tvrtko Ursulin

Quoting Chris Wilson (2019-12-27 16:34:26)
> Quoting Robert M. Fosha (2019-12-27 16:23:12)
> > With discrete graphics system can have both integrated and discrete GPU
> > handled by i915.
> > 
> > Update path to PMU for non-integrated devices to include PCI device name
> > string to match driver implementation. Integrated devices keep legacy
> > path.
> > 
> > Signed-off-by: Robert M. Fosha <robert.m.fosha@intel.com>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > ---
> >  lib/igt_perf.c    | 53 ++++++++++++++++++++++++++++++++++++++++++++---
> >  tools/meson.build |  2 +-
> >  2 files changed, 51 insertions(+), 4 deletions(-)
> > 
> > diff --git a/lib/igt_perf.c b/lib/igt_perf.c
> > index e3dec2cc..f4a0036f 100644
> > --- a/lib/igt_perf.c
> > +++ b/lib/igt_perf.c
> > @@ -5,27 +5,74 @@
> >  #include <string.h>
> >  #include <errno.h>
> >  #include <sys/sysinfo.h>
> > +#include <sys/stat.h>
> >  
> >  #include "igt_perf.h"
> >  
> > +#include "drmtest.h"
> > +#include "igt_debugfs.h"
> > +
> > +static char *perf_event_sysfs_path(void)
> > +{
> > +       int drm_fd;
> > +       static const char unique[] = "unique=";
> > +       static const char prefix[] = "/sys/bus/event_source/devices/i915";
> > +       char path[100];
> > +       char buf[100];
> > +       char *busid;
> > +       struct stat st;
> > +
> > +       drm_fd = drm_open_driver(DRIVER_INTEL);
> 
> Just stop there. How does this relate to the device we want?

There is also the problem that this library does not link to libigt; and
must not as the dependencies are unwanted and prohibitive.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-27 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 16:23 [igt-dev] [PATCH i-g-t] lib/igt_perf: Support multiple GPUs Robert M. Fosha
2019-12-27 16:34 ` Chris Wilson
2019-12-27 16:42   ` Chris Wilson
2019-12-27 16:40 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.