summaryrefslogtreecommitdiffstats
path: root/src/intel/perf
Commit message (Collapse)AuthorAgeFilesLines
* intel/perf: use MAJOR_IN_SYSMACROS/MAJOR_IN_MKDEVGreg V2019-08-081-0/+4
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Fixes: 134e750e16bfc53480e0 ("i965: extract performance query metrics")
* intel/perf: fix debug typoMark Janes2019-08-071-5/+5
| | | | | | Misspelling was seen with INTEL_DEBUG=perfmon. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: make gen_perf_query_object privateMark Janes2019-08-072-72/+80
| | | | | | Encapsulate the details of this structure within the perf implemenation. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: make perf context privateMark Janes2019-08-072-64/+109
| | | | | | Encapsulate the details of this data structure. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: print debug informationMark Janes2019-08-072-0/+35
| | | | | | | | | INTEL_DEBUG=perfmon will iterate over the perf queries, printing information about the state of each query. Some of this information will be private to intel/perf, and needs to a dump routine that can be called from i965. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: make internal methods privateMark Janes2019-08-072-95/+62
| | | | | | | Now that all references from i965 have been moved to perf, we can make internal methods private again. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: make oa_sample_buffers privateMark Janes2019-08-072-119/+120
| | | | | | | All references to this data structure have been moved inside the perf subsystem. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: expose method to create queryMark Janes2019-08-072-0/+19
| | | | | | | By encapsulating this implementation within perf, we can eventually make struct gen_perf_ctx private. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move initialization of pipeline statistics metrics to gen_perfMark Janes2019-08-072-124/+219
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move get_query_data into gen_perfMark Janes2019-08-072-0/+376
| | | | | | | | | | | | | | | This refactor moves several helper functions for get_query_data as well: - accumulate_oa_reports - read_gt_frequency - get_pipeline_stats_data - get_oa_counter_data Functions which are no longer referenced in brw_performance_query.c have been removed. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move delete_query to gen_perfMark Janes2019-08-072-0/+93
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move is_query_ready to gen_perfMark Janes2019-08-072-0/+31
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move wait_query to perfMark Janes2019-08-072-0/+167
| | | | | | | | | | | | | The following methods have duplicate implementation of read_oa_samples_until in brw_performance_query.c: - read_oa_samples_for_query - read_oa_samples_until They ar still referenced by other methods in the file and will be removed on the subsequent commit. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for bo_busyMark Janes2019-08-071-0/+1
| | | | | | | Iris and i965 variants of this method need to be called by perf routines. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for bo_wait_renderingMark Janes2019-08-071-0/+1
| | | | | | | Iris and i965 variants of this method need to be called by perf routines. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for batch_referencesMark Janes2019-08-071-0/+1
| | | | | | | Iris and i965 variants of this method need to be called by perf routines. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: refactor gen_perf_end_query into gen_perfMark Janes2019-08-072-0/+56
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: refactor gen_perf_begin_query into gen_perfMark Janes2019-08-072-0/+259
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move perf-related state into gen_perf_contextMark Janes2019-08-072-0/+51
| | | | | | | | | | | | To move more operations into intel/perf, several state items are needed. Save references to that state in the perf_ctxt, rather than passing them in for every operation. This commit includes an initializer for gen_perf_context, to set those references and also encapsulate the initialization of the sample buffer state. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entries for buffer object map/unmapMark Janes2019-08-072-0/+5
| | | | | | These operations are needed to refactor subsequent methods into perf Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move client reference counts into perfMark Janes2019-08-072-0/+32
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move open_perf into perfMark Janes2019-08-072-0/+47
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move close_perf into perfMark Janes2019-08-072-0/+18
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for emit_mi_flushMark Janes2019-08-071-0/+1
| | | | | | This method is needed to move subsequent methods into perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move snapshot_statistics_registers into perfMark Janes2019-08-072-0/+30
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move query_object into perfMark Janes2019-08-071-1/+73
| | | | | | Query objects can now be encapsulated within the perf subsystem. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for store_register_mem64Mark Janes2019-08-071-0/+2
| | | | | | This method is needed to move subsequent methods into perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move free_sample_bufs into perfMark Janes2019-08-072-0/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move reap_old_sample_buffers into perfMark Janes2019-08-072-0/+25
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move get_free_sample_buf into perfMark Janes2019-08-072-0/+20
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move the perf context into perfMark Janes2019-08-071-0/+57
| | | | | | | | | | | | The "context" that is necessary to submit and process perf commands to the hardware was previously present in the brw_context.perfquery struct. This commit moves it into perf and provides a more understandable name. The intention is for this struct to be private, when all methods that access it are migrated into perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move get_metric_id to perfMark Janes2019-08-072-0/+36
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move oa_sample_buf structure to perfMark Janes2019-08-071-0/+125
| | | | | | | | oa_sample_buf holds the data provided by the kernel that will be collated into performance metrics. Since this functionality will be implemented in perf, the struct needs to be defined there. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: enumerate query-based metrics in perfMark Janes2019-08-072-0/+236
| | | | | | | Iris and i965 both need to enumerate the available metrics, so these routines must be located in perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move perf-related constants to common locationMark Janes2019-08-071-0/+21
| | | | | | | | The perf subsystem needs several macro definitions that were duplicated in Iris and i965 headers. Place these macros within perf, if the perf implementation contains the only references to the values. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for capture_frequency_stat_registerMark Janes2019-08-071-0/+2
| | | | | | In preparation for calling both Iris and i965 implementions from perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for batchbuffer_flushMark Janes2019-08-071-0/+2
| | | | | | In preparation for calling both Iris and i965 implementions from perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for emit_report_countMark Janes2019-08-071-0/+4
| | | | | | In preparation for calling both Iris and i965 implementions from perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable entry for bo_unreferenceMark Janes2019-08-071-0/+1
| | | | | | In preparation for calling both Iris and i965 implementions from perf. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: create a vtable for low-level driver functionsMark Janes2019-08-071-0/+4
| | | | | | | | | | | Performance metrics collections requires several actions (eg bo_map()) that have different implementations for Iris and i965. The perf subsystem needs a vtable for each of these actions, so it can invoke the corresponding implementation for each driver. The first call to be added to the table is bo_alloc. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: use common ioctl wrapperMark Janes2019-08-072-9/+5
| | | | | | | | There were multiple ioctl-wrapper functions, so a common implementation was put in gen_gem.h. With a common implementation, perf no longer needs the caller to configure one for it. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: rename gen_perf to gen_perf_configMark Janes2019-08-073-26/+26
| | | | | | | | | | | | | | | This structure contains the configurations of the metrics for the current platform, and the settings needed for the perf subsystem to query that configuration from the device. This data is available without a rendering context, and needed to support MDAPI metrics for Vulkan. A gen_perf_context struct will be added later, which holds additional state from the rendering context necessary for metric data collection. The gen_perf struct needs a more precise name to reduce confusion. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: replace MAYBE_UNUSED with UNUSEDEric Engestrom2019-07-311-1/+1
| | | | | | | | MAYBE_UNUSED is going away, so let's replace legitimate uses of it with UNUSED, which the former aliased to so far anyway. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel/perf: improve dynamic loading config detectionLionel Landwerlin2019-06-051-15/+3
| | | | | | | | | | | | | | | We're currently trying to detect dynamic loading config support by trying to remove to test config (hard coded in the i915 driver) and checking we get ENOENT. This can fail if the test config was updated in Mesa but not yet in i915. A better way to do this is to pick an invalid ID and check for ENOENT. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: fix EuThreadsCount value in performance equationsLionel Landwerlin2019-06-051-2/+1
| | | | | | | | | EuThreadsCount is supposed to be the number of threads per EU, not the total number of threads in the whole device. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 1fc7b951278428 ("i965: Add Gen8+ INTEL_performance_query support") Reviewed-by: Kenneth Graunke <[email protected]>
* i965: fix icelake performance query enablingLionel Landwerlin2019-04-251-0/+2
| | | | | | | | | This was a rebase issue which lost of change to a file moved from i965 to src/intel/perf. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 134e750e16bfc5 ("i965: extract performance query metrics") Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: constify accumlator parameterLionel Landwerlin2019-04-172-3/+3
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* intel/perf: drop counter size fieldLionel Landwerlin2019-04-172-4/+20
| | | | | | | We can deduct the size from another field, let's just save some space. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* i965: perf: add mdapi pipeline statistics queries on gen10/11Lionel Landwerlin2019-04-171-0/+1
| | | | | | | | | The Gen10+ expected format adds an additional counter which we can't disclose yet. We can still make the size of the expected query result match. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* intel/perf: stub gen10/11 missing definitionsLionel Landwerlin2019-04-171-0/+4
| | | | Reviewed-by: Mark Janes <[email protected]>