All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 03/10] tests/perf: update max buffer size for reading reports
Date: Wed, 23 Aug 2017 10:43:11 +0100	[thread overview]
Message-ID: <20170823094318.18966-4-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20170823094318.18966-1-lionel.g.landwerlin@intel.com>

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 tests/perf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index 5058315c..bc5ea133 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -1280,9 +1280,7 @@ read_2_oa_reports(int format_id,
 	/* Note: we allocate a large buffer so that each read() iteration
 	 * should scrape *all* pending records.
 	 *
-	 * The largest buffer the OA unit supports is 16MB and the smallest
-	 * OA report format is 64bytes allowing up to 262144 reports to
-	 * be buffered.
+	 * The largest buffer the OA unit supports is 16MB.
 	 *
 	 * Being sure we are fetching all buffered reports allows us to
 	 * potentially throw away / skip all reports whenever we see
@@ -1295,7 +1293,8 @@ read_2_oa_reports(int format_id,
 	 * to indicate that the OA unit may be over taxed if lots of reports
 	 * are being lost.
 	 */
-	int buf_size = 262144 * (64 + sizeof(struct drm_i915_perf_record_header));
+	int max_reports = (16 * 1024 * 1024) / format_size;
+	int buf_size = sample_size * max_reports * 1.5;
 	uint8_t *buf = malloc(buf_size);
 	int n = 0;
 
@@ -1307,6 +1306,7 @@ read_2_oa_reports(int format_id,
 			;
 
 		igt_assert(len > 0);
+		igt_debug("read %d bytes\n", (int)len);
 
 		for (size_t offset = 0; offset < len; offset += header->size) {
 			const uint32_t *report;
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-08-23  9:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  9:43 [PATCH v2 00/10] Improve robustness of the i915 perf tests Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 01/10] tests/perf: make stream_fd a global variable Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 02/10] tests/perf: add per context filtering test for gen8+ Lionel Landwerlin
2017-08-23  9:43 ` Lionel Landwerlin [this message]
2017-08-23  9:43 ` [PATCH v2 04/10] tests/perf: rc6: try to guess when rc6 is disabled Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 05/10] tests/perf: remove frequency related changes Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 06/10] tests/perf: rework oa-exponent test Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 07/10] tests/perf: make enable-disable more reliable Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 08/10] tests/perf: make buffer-fill " Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 09/10] tests/perf: add Kabylake support Lionel Landwerlin
2017-08-23  9:43 ` [PATCH v2 10/10] tests/perf: add Geminilake support Lionel Landwerlin
2017-08-28  7:21 ` [PATCH v2 00/10] Improve robustness of the i915 perf tests Arkadiusz Hiler
2017-08-28 13:33   ` Lionel Landwerlin
2017-08-28 14:23     ` Arkadiusz Hiler
2017-08-29  8:54       ` Lionel Landwerlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170823094318.18966-4-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.