* [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning @ 2020-02-21 10:38 Petri Latvala 2020-02-21 12:55 ` [igt-dev] ✓ Fi.CI.BAT: success for tools/i915-perf: Fix compiler warning (rev2) Patchwork 2020-02-24 9:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 0 siblings, 2 replies; 4+ messages in thread From: Petri Latvala @ 2020-02-21 10:38 UTC (permalink / raw) To: igt-dev; +Cc: Petri Latvala Remove the _dump half of the pair of recorder command structs and use a plain array of uint8_ts instead. Leave the struct in a comment to act as documentation. As a drive-by fix, add include guards to i915_perf_recorder_commands.h Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> --- tools/i915-perf/i915_perf_control.c | 8 ++++---- tools/i915-perf/i915_perf_recorder.c | 10 +++++----- tools/i915-perf/i915_perf_recorder_commands.h | 11 ++++++++++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/tools/i915-perf/i915_perf_control.c b/tools/i915-perf/i915_perf_control.c index a8d0d30f..be5996c0 100644 --- a/tools/i915-perf/i915_perf_control.c +++ b/tools/i915-perf/i915_perf_control.c @@ -93,12 +93,12 @@ main(int argc, char *argv[]) sizeof(struct recorder_command_base) + strlen(dump_file) + 1; struct { struct recorder_command_base base; - struct recorder_command_dump dump; + uint8_t dump[]; } *data = malloc(total_len); data->base.command = RECORDER_COMMAND_DUMP; data->base.size = total_len; - snprintf((char *) data->dump.path, strlen(dump_file) + 1, "%s", dump_file); + snprintf((char *) data->dump, strlen(dump_file) + 1, "%s", dump_file); fwrite(data, total_len, 1, command_fifo_file); } else { @@ -107,12 +107,12 @@ main(int argc, char *argv[]) uint32_t total_len = sizeof(struct recorder_command_base) + path_len; struct { struct recorder_command_base base; - struct recorder_command_dump dump; + uint8_t dump[]; } *data = malloc(total_len); data->base.command = RECORDER_COMMAND_DUMP; data->base.size = total_len; - snprintf((char *) data->dump.path, path_len, "%s/%s", cwd, dump_file); + snprintf((char *) data->dump, path_len, "%s/%s", cwd, dump_file); fwrite(data, total_len, 1, command_fifo_file); } diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c index 760cabf1..6bbc451e 100644 --- a/tools/i915-perf/i915_perf_recorder.c +++ b/tools/i915-perf/i915_perf_recorder.c @@ -605,7 +605,7 @@ read_command_file(struct recording_context *ctx) switch (header.command) { case RECORDER_COMMAND_DUMP: { uint32_t len = header.size - sizeof(header), offset = 0; - struct recorder_command_dump *dump = malloc(len); + uint8_t *dump = malloc(len); FILE *file; while (offset < len && @@ -616,9 +616,9 @@ read_command_file(struct recording_context *ctx) offset += ret; } - fprintf(stdout, "Writing circular buffer to %s\n", dump->path); + fprintf(stdout, "Writing circular buffer to %s\n", dump); - file = fopen((const char *) dump->path, "w+"); + file = fopen((const char *) dump, "w+"); if (file) { struct chunk chunks[2]; @@ -634,11 +634,11 @@ read_command_file(struct recording_context *ctx) fwrite(chunks[1].data, chunks[1].len, 1, file) != 1) || !write_correlation_timestamps(file, ctx->drm_fd)) { fprintf(stderr, "Unable to write circular buffer data in file '%s'\n", - dump->path); + dump); } fclose(file); } else - fprintf(stderr, "Unable to write dump file '%s'\n", dump->path); + fprintf(stderr, "Unable to write dump file '%s'\n", dump); free(dump); break; diff --git a/tools/i915-perf/i915_perf_recorder_commands.h b/tools/i915-perf/i915_perf_recorder_commands.h index 4855d80f..d9353cfa 100644 --- a/tools/i915-perf/i915_perf_recorder_commands.h +++ b/tools/i915-perf/i915_perf_recorder_commands.h @@ -20,6 +20,9 @@ * SOFTWARE. */ +#ifndef I915_PERF_RECORDER_COMMANDS_H +#define I915_PERF_RECORDER_COMMANDS_H + #include <stdint.h> #define I915_PERF_RECORD_FIFO_PATH "/tmp/.i915-perf-record" @@ -31,9 +34,15 @@ enum recorder_command { struct recorder_command_base { uint32_t command; - uint32_t size; + uint32_t size; /* size of recorder_command_base + dump in bytes */ }; +/* + The dump after the recorder_command_base header: + struct recorder_command_dump { uint8_t path[0]; }; +*/ + +#endif -- 2.20.1 _______________________________________________ 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
* [igt-dev] ✓ Fi.CI.BAT: success for tools/i915-perf: Fix compiler warning (rev2) 2020-02-21 10:38 [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning Petri Latvala @ 2020-02-21 12:55 ` Patchwork 2020-02-24 9:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 1 sibling, 0 replies; 4+ messages in thread From: Patchwork @ 2020-02-21 12:55 UTC (permalink / raw) To: Petri Latvala; +Cc: igt-dev == Series Details == Series: tools/i915-perf: Fix compiler warning (rev2) URL : https://patchwork.freedesktop.org/series/73714/ State : success == Summary == CI Bug Log - changes from IGT_5457 -> IGTPW_4207 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html Known issues ------------ Here are the changes found in IGTPW_4207 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_parallel@contexts: - fi-byt-n2820: [PASS][1] -> [FAIL][2] ([i915#694]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-byt-n2820/igt@gem_exec_parallel@contexts.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-byt-n2820/igt@gem_exec_parallel@contexts.html * igt@gem_exec_suspend@basic-s4-devices: - fi-tgl-y: [PASS][3] -> [FAIL][4] ([CI#94]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html * igt@gem_mmap_gtt@basic: - fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-tgl-y/igt@gem_mmap_gtt@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-tgl-y/igt@gem_mmap_gtt@basic.html * igt@i915_selftest@live_gtt: - fi-skl-6600u: [PASS][7] -> [TIMEOUT][8] ([fdo#111732] / [fdo#112271]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-skl-6600u/igt@i915_selftest@live_gtt.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-skl-6600u/igt@i915_selftest@live_gtt.html * igt@kms_chamelium@dp-edid-read: - fi-icl-u2: [PASS][9] -> [FAIL][10] ([fdo#109635] / [i915#217]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-icl-u2/igt@kms_chamelium@dp-edid-read.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-icl-u2/igt@kms_chamelium@dp-edid-read.html #### Possible fixes #### * igt@kms_addfb_basic@addfb25-bad-modifier: - fi-tgl-y: [DMESG-WARN][11] ([CI#94] / [i915#402]) -> [PASS][12] +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-tgl-y/igt@kms_addfb_basic@addfb25-bad-modifier.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-tgl-y/igt@kms_addfb_basic@addfb25-bad-modifier.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][13] ([fdo#111407]) -> [PASS][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-bwr-2160: [FAIL][15] ([i915#34]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank.html #### Warnings #### * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][17] ([fdo#109315] / [i915#585]) -> [SKIP][18] ([fdo#109315]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/fi-icl-u3/igt@amdgpu/amd_prime@amd-to-i915.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/fi-icl-u3/igt@amdgpu/amd_prime@amd-to-i915.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217 [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694 Participating hosts (50 -> 44) ------------------------------ Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_5457 -> IGTPW_4207 CI-20190529: 20190529 CI_DRM_7980: 27a7d60b2dd30ef9901b912893835949fd369432 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_4207: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html IGT_5457: 3e686098d928aa928f668e00fa01e92234e173ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html _______________________________________________ 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] ✓ Fi.CI.IGT: success for tools/i915-perf: Fix compiler warning (rev2) 2020-02-21 10:38 [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning Petri Latvala 2020-02-21 12:55 ` [igt-dev] ✓ Fi.CI.BAT: success for tools/i915-perf: Fix compiler warning (rev2) Patchwork @ 2020-02-24 9:27 ` Patchwork 1 sibling, 0 replies; 4+ messages in thread From: Patchwork @ 2020-02-24 9:27 UTC (permalink / raw) To: Petri Latvala; +Cc: igt-dev == Series Details == Series: tools/i915-perf: Fix compiler warning (rev2) URL : https://patchwork.freedesktop.org/series/73714/ State : success == Summary == CI Bug Log - changes from IGT_5457_full -> IGTPW_4207_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html Known issues ------------ Here are the changes found in IGTPW_4207_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_parallel@vcs1-fds: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +10 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb4/igt@gem_exec_parallel@vcs1-fds.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb7/igt@gem_exec_parallel@vcs1-fds.html * igt@gem_exec_schedule@independent-bsd2: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276]) +15 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb2/igt@gem_exec_schedule@independent-bsd2.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb6/igt@gem_exec_schedule@independent-bsd2.html * igt@gem_exec_schedule@pi-shared-iova-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([i915#677]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb8/igt@gem_exec_schedule@pi-shared-iova-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb1/igt@gem_exec_schedule@pi-shared-iova-bsd.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +4 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb3/igt@gem_exec_schedule@preempt-other-chain-bsd.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-kbl: [PASS][9] -> [FAIL][10] ([i915#644]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl3/igt@gem_ppgtt@flink-and-close-vma-leak.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl6/igt@gem_ppgtt@flink-and-close-vma-leak.html * igt@gem_userptr_blits@dmabuf-sync: - shard-snb: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870] / [i915#478]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-snb6/igt@gem_userptr_blits@dmabuf-sync.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-snb5/igt@gem_userptr_blits@dmabuf-sync.html * igt@gen9_exec_parse@allowed-all: - shard-glk: [PASS][13] -> [DMESG-WARN][14] ([i915#716]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk2/igt@gen9_exec_parse@allowed-all.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk2/igt@gen9_exec_parse@allowed-all.html * igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-xtiled: - shard-snb: [PASS][15] -> [DMESG-WARN][16] ([i915#478]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-snb4/igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-xtiled.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-snb1/igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-xtiled.html * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: - shard-glk: [PASS][17] -> [FAIL][18] ([i915#79]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html * igt@kms_flip@flip-vs-modeset-vs-hang-interruptible: - shard-glk: [PASS][19] -> [TIMEOUT][20] ([fdo#112271]) +1 similar issue [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk8/igt@kms_flip@flip-vs-modeset-vs-hang-interruptible.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk6/igt@kms_flip@flip-vs-modeset-vs-hang-interruptible.html * igt@kms_flip@flip-vs-panning-vs-hang-interruptible: - shard-tglb: [PASS][21] -> [TIMEOUT][22] ([fdo#112271] / [i915#561]) +1 similar issue [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb5/igt@kms_flip@flip-vs-panning-vs-hang-interruptible.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb6/igt@kms_flip@flip-vs-panning-vs-hang-interruptible.html * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen: - shard-tglb: [PASS][23] -> [SKIP][24] ([i915#668]) +5 similar issues [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen.html * igt@kms_plane_lowres@pipe-a-tiling-x: - shard-glk: [PASS][25] -> [FAIL][26] ([i915#899]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk5/igt@kms_plane_lowres@pipe-a-tiling-x.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk7/igt@kms_plane_lowres@pipe-a-tiling-x.html * igt@kms_psr2_su@frontbuffer: - shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109642] / [fdo#111068]) [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb2/igt@kms_psr2_su@frontbuffer.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb3/igt@kms_psr2_su@frontbuffer.html * igt@kms_psr@psr2_primary_mmap_gtt: - shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109441]) +1 similar issue [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb4/igt@kms_psr@psr2_primary_mmap_gtt.html * igt@kms_vblank@pipe-a-ts-continuation-suspend: - shard-kbl: [PASS][31] -> [DMESG-WARN][32] ([i915#180]) +4 similar issues [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-kbl: [PASS][33] -> [INCOMPLETE][34] ([fdo#103665]) [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl2/igt@kms_vblank@pipe-c-ts-continuation-suspend.html * igt@perf@gen12-mi-rpc: - shard-tglb: [PASS][35] -> [TIMEOUT][36] ([fdo#112271] / [i915#1085]) [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb3/igt@perf@gen12-mi-rpc.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb3/igt@perf@gen12-mi-rpc.html * igt@perf@short-reads: - shard-apl: [PASS][37] -> [TIMEOUT][38] ([fdo#112271] / [i915#51]) [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-apl8/igt@perf@short-reads.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-apl8/igt@perf@short-reads.html * igt@sw_sync@sync_multi_producer_single_consumer: - shard-snb: [PASS][39] -> [TIMEOUT][40] ([fdo#112271]) [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-snb4/igt@sw_sync@sync_multi_producer_single_consumer.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-snb2/igt@sw_sync@sync_multi_producer_single_consumer.html #### Possible fixes #### * {igt@gem_ctx_persistence@legacy-engines-hostile@default}: - shard-glk: [FAIL][41] -> [PASS][42] [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk4/igt@gem_ctx_persistence@legacy-engines-hostile@default.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk6/igt@gem_ctx_persistence@legacy-engines-hostile@default.html * igt@gem_exec_balancer@hang: - shard-tglb: [FAIL][43] ([i915#1277]) -> [PASS][44] [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb6/igt@gem_exec_balancer@hang.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb6/igt@gem_exec_balancer@hang.html * {igt@gem_exec_schedule@implicit-read-write-bsd1}: - shard-iclb: [SKIP][45] ([fdo#109276] / [i915#677]) -> [PASS][46] +2 similar issues [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb8/igt@gem_exec_schedule@implicit-read-write-bsd1.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb4/igt@gem_exec_schedule@implicit-read-write-bsd1.html * igt@gem_exec_schedule@out-order-bsd2: - shard-iclb: [SKIP][47] ([fdo#109276]) -> [PASS][48] +21 similar issues [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb5/igt@gem_exec_schedule@out-order-bsd2.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb2/igt@gem_exec_schedule@out-order-bsd2.html * igt@gem_exec_schedule@pi-distinct-iova-bsd: - shard-iclb: [SKIP][49] ([i915#677]) -> [PASS][50] +3 similar issues [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb4/igt@gem_exec_schedule@pi-distinct-iova-bsd.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb8/igt@gem_exec_schedule@pi-distinct-iova-bsd.html * igt@gem_exec_schedule@wide-bsd: - shard-iclb: [SKIP][51] ([fdo#112146]) -> [PASS][52] +2 similar issues [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb4/igt@gem_exec_schedule@wide-bsd.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb3/igt@gem_exec_schedule@wide-bsd.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-glk: [FAIL][53] ([i915#644]) -> [PASS][54] [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk5/igt@gem_ppgtt@flink-and-close-vma-leak.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk9/igt@gem_ppgtt@flink-and-close-vma-leak.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [DMESG-WARN][55] ([fdo#111870] / [i915#478]) -> [PASS][56] [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-snb2/igt@gem_userptr_blits@sync-unmap.html [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-snb1/igt@gem_userptr_blits@sync-unmap.html * igt@i915_pm_dc@dc6-psr: - shard-iclb: [FAIL][57] ([i915#454]) -> [PASS][58] [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb8/igt@i915_pm_dc@dc6-psr.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb1/igt@i915_pm_dc@dc6-psr.html * igt@i915_selftest@live_gt_lrc: - shard-tglb: [DMESG-FAIL][59] ([i915#1233]) -> [PASS][60] [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb2/igt@i915_selftest@live_gt_lrc.html [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb2/igt@i915_selftest@live_gt_lrc.html * igt@i915_selftest@live_gtt: - shard-apl: [TIMEOUT][61] ([fdo#112271]) -> [PASS][62] +1 similar issue [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-apl1/igt@i915_selftest@live_gtt.html [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-apl4/igt@i915_selftest@live_gtt.html * igt@i915_suspend@fence-restore-tiled2untiled: - shard-apl: [DMESG-WARN][63] ([i915#180]) -> [PASS][64] +3 similar issues [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-apl8/igt@i915_suspend@fence-restore-tiled2untiled.html [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-apl7/igt@i915_suspend@fence-restore-tiled2untiled.html * igt@kms_cursor_crc@pipe-c-cursor-256x85-onscreen: - shard-apl: [FAIL][65] ([i915#54]) -> [PASS][66] [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-apl6/igt@kms_cursor_crc@pipe-c-cursor-256x85-onscreen.html [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-apl4/igt@kms_cursor_crc@pipe-c-cursor-256x85-onscreen.html * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt: - shard-kbl: [FAIL][67] ([i915#49]) -> [PASS][68] [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html - shard-apl: [FAIL][69] ([i915#49]) -> [PASS][70] [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-apl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-apl3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html - shard-glk: [FAIL][71] ([i915#49]) -> [PASS][72] [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-glk1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-glk5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-kbl: [DMESG-WARN][73] ([i915#180]) -> [PASS][74] +2 similar issues [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl4/igt@kms_frontbuffer_tracking@fbc-suspend.html [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html * igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc: - shard-tglb: [SKIP][75] ([i915#668]) -> [PASS][76] +1 similar issue [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc.html [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-wc.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes: - shard-kbl: [INCOMPLETE][77] ([fdo#103665]) -> [PASS][78] [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html * igt@kms_setmode@basic: - shard-kbl: [FAIL][79] ([i915#31]) -> [PASS][80] [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl4/igt@kms_setmode@basic.html [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl7/igt@kms_setmode@basic.html * igt@perf_pmu@busy-no-semaphores-vcs1: - shard-iclb: [SKIP][81] ([fdo#112080]) -> [PASS][82] +16 similar issues [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb7/igt@perf_pmu@busy-no-semaphores-vcs1.html [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb1/igt@perf_pmu@busy-no-semaphores-vcs1.html * igt@sw_sync@sync_multi_producer_single_consumer: - shard-iclb: [TIMEOUT][83] ([fdo#112271]) -> [PASS][84] [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-iclb3/igt@sw_sync@sync_multi_producer_single_consumer.html [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-iclb6/igt@sw_sync@sync_multi_producer_single_consumer.html #### Warnings #### * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy: - shard-snb: [DMESG-WARN][85] ([fdo#110789] / [fdo#111870] / [i915#478]) -> [DMESG-WARN][86] ([fdo#111870] / [i915#478]) [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-snb1/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-snb4/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html * igt@kms_content_protection@atomic: - shard-kbl: [TIMEOUT][87] ([fdo#112271] / [i915#727]) -> [TIMEOUT][88] ([fdo#112271]) [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl7/igt@kms_content_protection@atomic.html [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl2/igt@kms_content_protection@atomic.html * igt@kms_content_protection@lic: - shard-kbl: [TIMEOUT][89] ([fdo#112271]) -> [TIMEOUT][90] ([fdo#112271] / [i915#727]) [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5457/shard-kbl1/igt@kms_content_protection@lic.html [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/shard-kbl1/igt@kms_content_protection@lic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642 [fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789 [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870 [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080 [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1085]: https://gitlab.freedesktop.org/drm/intel/issues/1085 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#1277]: https://gitlab.freedesktop.org/drm/intel/issues/1277 [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180 [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31 [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454 [i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478 [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49 [i915#51]: https://gitlab.freedesktop.org/drm/intel/issues/51 [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54 [i915#561]: https://gitlab.freedesktop.org/drm/intel/issues/561 [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644 [i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668 [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677 [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716 [i915#727]: https://gitlab.freedesktop.org/drm/intel/issues/727 [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79 [i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899 Participating hosts (8 -> 8) ------------------------------ No changes in participating hosts Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_5457 -> IGTPW_4207 CI-20190529: 20190529 CI_DRM_7980: 27a7d60b2dd30ef9901b912893835949fd369432 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_4207: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html IGT_5457: 3e686098d928aa928f668e00fa01e92234e173ff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4207/index.html _______________________________________________ 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] [PATCH i-g-t] tools/i915-perf: Fix compiler warning @ 2020-02-20 13:12 Petri Latvala 0 siblings, 0 replies; 4+ messages in thread From: Petri Latvala @ 2020-02-20 13:12 UTC (permalink / raw) To: igt-dev; +Cc: Petri Latvala Use flexible array member in the first struct instead of two structs and a 0-length array so compiler knows we really meant to read and write past it. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> --- tools/i915-perf/i915_perf_control.c | 24 +++++++------------ tools/i915-perf/i915_perf_recorder.c | 7 ++++-- tools/i915-perf/i915_perf_recorder_commands.h | 5 +--- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/tools/i915-perf/i915_perf_control.c b/tools/i915-perf/i915_perf_control.c index a8d0d30f..3722f2b1 100644 --- a/tools/i915-perf/i915_perf_control.c +++ b/tools/i915-perf/i915_perf_control.c @@ -91,28 +91,22 @@ main(int argc, char *argv[]) if (dump_file[0] == '/') { uint32_t total_len = sizeof(struct recorder_command_base) + strlen(dump_file) + 1; - struct { - struct recorder_command_base base; - struct recorder_command_dump dump; - } *data = malloc(total_len); + struct recorder_command_base *data = malloc(total_len); - data->base.command = RECORDER_COMMAND_DUMP; - data->base.size = total_len; - snprintf((char *) data->dump.path, strlen(dump_file) + 1, "%s", dump_file); + data->command = RECORDER_COMMAND_DUMP; + data->size = total_len; + snprintf((char *) data->path, strlen(dump_file) + 1, "%s", dump_file); fwrite(data, total_len, 1, command_fifo_file); } else { char *cwd = get_current_dir_name(); uint32_t path_len = strlen(cwd) + 1 + strlen(dump_file) + 1; uint32_t total_len = sizeof(struct recorder_command_base) + path_len; - struct { - struct recorder_command_base base; - struct recorder_command_dump dump; - } *data = malloc(total_len); - - data->base.command = RECORDER_COMMAND_DUMP; - data->base.size = total_len; - snprintf((char *) data->dump.path, path_len, "%s/%s", cwd, dump_file); + struct recorder_command_base *data = malloc(total_len); + + data->command = RECORDER_COMMAND_DUMP; + data->size = total_len; + snprintf((char *) data->path, path_len, "%s/%s", cwd, dump_file); fwrite(data, total_len, 1, command_fifo_file); } diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c index 760cabf1..bd477746 100644 --- a/tools/i915-perf/i915_perf_recorder.c +++ b/tools/i915-perf/i915_perf_recorder.c @@ -605,12 +605,15 @@ read_command_file(struct recording_context *ctx) switch (header.command) { case RECORDER_COMMAND_DUMP: { uint32_t len = header.size - sizeof(header), offset = 0; - struct recorder_command_dump *dump = malloc(len); + struct recorder_command_base *dump = malloc(sizeof(header) + len); FILE *file; + /* Not really needed since current code only accesses dump->path but for completeness... */ + memcpy(dump, &header, sizeof(header)); + while (offset < len && ((ret = read(ctx->command_fifo_fd, - (void *) dump + offset, len - offset)) > 0 + (void *) dump->path + offset, len - offset)) > 0 || errno == EAGAIN)) { if (ret > 0) offset += ret; diff --git a/tools/i915-perf/i915_perf_recorder_commands.h b/tools/i915-perf/i915_perf_recorder_commands.h index 4855d80f..5d84ca82 100644 --- a/tools/i915-perf/i915_perf_recorder_commands.h +++ b/tools/i915-perf/i915_perf_recorder_commands.h @@ -32,8 +32,5 @@ enum recorder_command { struct recorder_command_base { uint32_t command; uint32_t size; -}; - -struct recorder_command_dump { - uint8_t path[0]; + uint8_t path[]; }; -- 2.20.1 _______________________________________________ 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
end of thread, other threads:[~2020-02-24 9:27 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-02-21 10:38 [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning Petri Latvala 2020-02-21 12:55 ` [igt-dev] ✓ Fi.CI.BAT: success for tools/i915-perf: Fix compiler warning (rev2) Patchwork 2020-02-24 9:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2020-02-20 13:12 [igt-dev] [PATCH i-g-t] tools/i915-perf: Fix compiler warning Petri Latvala
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox