intel/perf: break GL query stuff away
This stuff is somewhat specific to the GL extension & drivers. On Vulkan we won't use this, it also made a rather large file. v2: Fix Android build (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
This commit is contained in:

committed by
Marge Bot

parent
f5c5574f42
commit
33b9c7a7f6
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "iris_perf.h"
|
||||
#include "iris_context.h"
|
||||
#include "perf/gen_perf_regs.h"
|
||||
|
||||
static void *
|
||||
iris_oa_bo_alloc(void *bufmgr, const char *name, uint64_t size)
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#define IRIS_PERF_H
|
||||
|
||||
#include "perf/gen_perf.h"
|
||||
#include "perf/gen_perf_query.h"
|
||||
|
||||
void iris_perf_init_vtbl(struct gen_perf_config *cfg);
|
||||
|
||||
|
@@ -25,9 +25,6 @@
|
||||
#include "iris_context.h"
|
||||
#include "iris_perf.h"
|
||||
|
||||
#include "perf/gen_perf.h"
|
||||
#include "perf/gen_perf_regs.h"
|
||||
|
||||
struct iris_perf_query {
|
||||
struct gl_perf_query_object base;
|
||||
struct gen_perf_query_object *query;
|
||||
|
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "perf/gen_perf.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "pipe/p_context.h"
|
||||
|
@@ -357,8 +357,10 @@ GEN_PERF_XML_FILES = \
|
||||
GEN_PERF_FILES = \
|
||||
perf/gen_perf.c \
|
||||
perf/gen_perf.h \
|
||||
perf/gen_perf_mdapi.c \
|
||||
perf/gen_perf_mdapi.h \
|
||||
perf/gen_perf_mdapi.c
|
||||
perf/gen_perf_query.h \
|
||||
perf/gen_perf_query.c
|
||||
|
||||
GEN_PERF_GENERATED_FILES = \
|
||||
perf/gen_perf_metrics.c \
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -241,9 +241,6 @@ struct gen_perf_config {
|
||||
} vtbl;
|
||||
};
|
||||
|
||||
struct gen_perf_query_object;
|
||||
const struct gen_perf_query_info* gen_perf_query_info(const struct gen_perf_query_object *);
|
||||
|
||||
void gen_perf_init_metrics(struct gen_perf_config *perf_cfg,
|
||||
const struct gen_device_info *devinfo,
|
||||
int drm_fd);
|
||||
@@ -283,22 +280,6 @@ void gen_perf_query_result_accumulate(struct gen_perf_query_result *result,
|
||||
const uint32_t *end);
|
||||
void gen_perf_query_result_clear(struct gen_perf_query_result *result);
|
||||
|
||||
struct gen_perf_context;
|
||||
struct gen_perf_context *gen_perf_new_context(void *parent);
|
||||
|
||||
void gen_perf_init_context(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_config *perf_cfg,
|
||||
void * ctx, /* driver context (eg, brw_context) */
|
||||
void * bufmgr, /* eg brw_bufmgr */
|
||||
const struct gen_device_info *devinfo,
|
||||
uint32_t hw_ctx,
|
||||
int drm_fd);
|
||||
|
||||
struct gen_perf_config *gen_perf_config(struct gen_perf_context *ctx);
|
||||
|
||||
int gen_perf_active_queries(struct gen_perf_context *perf_ctx,
|
||||
const struct gen_perf_query_info *query);
|
||||
|
||||
static inline size_t
|
||||
gen_perf_query_counter_get_size(const struct gen_perf_query_counter *counter)
|
||||
{
|
||||
@@ -325,31 +306,4 @@ gen_perf_new(void *ctx)
|
||||
return perf;
|
||||
}
|
||||
|
||||
struct gen_perf_query_object *
|
||||
gen_perf_new_query(struct gen_perf_context *, unsigned query_index);
|
||||
|
||||
|
||||
bool gen_perf_begin_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_end_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_wait_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
void *current_batch);
|
||||
bool gen_perf_is_query_ready(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
void *current_batch);
|
||||
void gen_perf_delete_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_get_query_data(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
int data_size,
|
||||
unsigned *data,
|
||||
unsigned *bytes_written);
|
||||
|
||||
void gen_perf_dump_query_count(struct gen_perf_context *perf_ctx);
|
||||
void gen_perf_dump_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *obj,
|
||||
void *current_batch);
|
||||
|
||||
#endif /* GEN_PERF_H */
|
||||
|
1584
src/intel/perf/gen_perf_query.c
Normal file
1584
src/intel/perf/gen_perf_query.c
Normal file
File diff suppressed because it is too large
Load Diff
88
src/intel/perf/gen_perf_query.h
Normal file
88
src/intel/perf/gen_perf_query.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright © 2019 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef GEN_PERF_QUERY_H
|
||||
#define GEN_PERF_QUERY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct gen_device_info;
|
||||
|
||||
struct gen_perf_config;
|
||||
struct gen_perf_context;
|
||||
struct gen_perf_query_object;
|
||||
|
||||
struct gen_perf_context *gen_perf_new_context(void *parent);
|
||||
|
||||
void gen_perf_init_context(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_config *perf_cfg,
|
||||
void * ctx, /* driver context (eg, brw_context) */
|
||||
void * bufmgr, /* eg brw_bufmgr */
|
||||
const struct gen_device_info *devinfo,
|
||||
uint32_t hw_ctx,
|
||||
int drm_fd);
|
||||
|
||||
const struct gen_perf_query_info* gen_perf_query_info(const struct gen_perf_query_object *);
|
||||
|
||||
|
||||
void gen_perf_init_context(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_config *perf_cfg,
|
||||
void * ctx, /* driver context (eg, brw_context) */
|
||||
void * bufmgr, /* eg brw_bufmgr */
|
||||
const struct gen_device_info *devinfo,
|
||||
uint32_t hw_ctx,
|
||||
int drm_fd);
|
||||
|
||||
struct gen_perf_config *gen_perf_config(struct gen_perf_context *ctx);
|
||||
|
||||
int gen_perf_active_queries(struct gen_perf_context *perf_ctx,
|
||||
const struct gen_perf_query_info *query);
|
||||
|
||||
struct gen_perf_query_object *
|
||||
gen_perf_new_query(struct gen_perf_context *, unsigned query_index);
|
||||
|
||||
|
||||
bool gen_perf_begin_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_end_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_wait_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
void *current_batch);
|
||||
bool gen_perf_is_query_ready(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
void *current_batch);
|
||||
void gen_perf_delete_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query);
|
||||
void gen_perf_get_query_data(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *query,
|
||||
int data_size,
|
||||
unsigned *data,
|
||||
unsigned *bytes_written);
|
||||
|
||||
void gen_perf_dump_query_count(struct gen_perf_context *perf_ctx);
|
||||
void gen_perf_dump_query(struct gen_perf_context *perf_ctx,
|
||||
struct gen_perf_query_object *obj,
|
||||
void *current_batch);
|
||||
|
||||
#endif /* GEN_PERF_QUERY_H */
|
@@ -17,6 +17,7 @@ endforeach
|
||||
|
||||
gen_perf_sources = [
|
||||
'gen_perf.c',
|
||||
'gen_perf_query.c',
|
||||
'gen_perf_mdapi.c',
|
||||
]
|
||||
|
||||
|
@@ -51,6 +51,7 @@
|
||||
#include "intel_screen.h"
|
||||
#include "intel_tex_obj.h"
|
||||
#include "perf/gen_perf.h"
|
||||
#include "perf/gen_perf_query.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -75,6 +75,7 @@
|
||||
#include "perf/gen_perf.h"
|
||||
#include "perf/gen_perf_regs.h"
|
||||
#include "perf/gen_perf_mdapi.h"
|
||||
#include "perf/gen_perf_query.h"
|
||||
|
||||
#define FILE_DEBUG_FLAG DEBUG_PERFMON
|
||||
|
||||
|
Reference in New Issue
Block a user