[igt-dev] [PATCH i-g-t v2 3/4] tests/perf: rename MAX_OA_BUFFER_SIZE
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Mon Oct 15 16:20:40 UTC 2018
We'll make this size configurable in the following commit, so make it
clear what this value is about to become.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
tests/perf.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/perf.c b/tests/perf.c
index 72e00132..6c448036 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -82,7 +82,7 @@ IGT_TEST_DESCRIPTION("Test the i915 perf metrics streaming interface");
#define PIPE_CONTROL_PPGTT_WRITE (0 << 2)
#define PIPE_CONTROL_GLOBAL_GTT_WRITE (1 << 2)
-#define MAX_OA_BUF_SIZE (16 * 1024 * 1024)
+#define DEFAULT_OA_BUF_SIZE (16 * 1024 * 1024)
struct accumulator {
#define MAX_RAW_OA_COUNTERS 62
@@ -1240,7 +1240,7 @@ 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 max_reports = MAX_OA_BUF_SIZE / format_size;
+ int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
int buf_size = sample_size * max_reports * 1.5;
uint8_t *buf = malloc(buf_size);
int n = 0;
@@ -1716,7 +1716,7 @@ test_oa_exponents(void)
size_t format_size = get_oa_format(test_oa_format).size;
size_t sample_size = (sizeof(struct drm_i915_perf_record_header) +
format_size);
- int max_reports = MAX_OA_BUF_SIZE / format_size;
+ int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
int buf_size = sample_size * max_reports * 1.5;
uint8_t *buf = calloc(1, buf_size);
int ret, n_timer_reports = 0;
@@ -2372,7 +2372,7 @@ test_buffer_fill(void)
int buf_size = 65536 * (256 + sizeof(struct drm_i915_perf_record_header));
uint8_t *buf = malloc(buf_size);
int len;
- size_t oa_buf_size = MAX_OA_BUF_SIZE;
+ size_t oa_buf_size = DEFAULT_OA_BUF_SIZE;
size_t report_size = get_oa_format(test_oa_format).size;
int n_full_oa_reports = oa_buf_size / report_size;
uint64_t fill_duration = n_full_oa_reports * oa_period;
@@ -2514,7 +2514,7 @@ test_enable_disable(void)
};
int buf_size = 65536 * (256 + sizeof(struct drm_i915_perf_record_header));
uint8_t *buf = malloc(buf_size);
- size_t oa_buf_size = MAX_OA_BUF_SIZE;
+ size_t oa_buf_size = DEFAULT_OA_BUF_SIZE;
size_t report_size = get_oa_format(test_oa_format).size;
int n_full_oa_reports = oa_buf_size / report_size;
uint64_t fill_duration = n_full_oa_reports * oa_period;
@@ -3196,7 +3196,7 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
size_t format_size = get_oa_format(test_oa_format).size;
size_t sample_size = (sizeof(struct drm_i915_perf_record_header) +
format_size);
- int max_reports = MAX_OA_BUF_SIZE / format_size;
+ int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
int buf_size = sample_size * max_reports * 1.5;
int child_ret;
uint8_t *buf = malloc(buf_size);
--
2.19.1
More information about the igt-dev
mailing list