Lines Matching refs:group
104 struct r600_pc_group *group = query->groups; in r600_pc_query_destroy() local
105 query->groups = group->next; in r600_pc_query_destroy()
106 FREE(group); in r600_pc_query_destroy()
128 struct r600_pc_group *group; in r600_pc_query_emit_start() local
135 for (group = query->groups; group; group = group->next) { in r600_pc_query_emit_start()
136 struct r600_perfcounter_block *block = group->block; in r600_pc_query_emit_start()
138 if (group->se != current_se || group->instance != current_instance) { in r600_pc_query_emit_start()
139 current_se = group->se; in r600_pc_query_emit_start()
140 current_instance = group->instance; in r600_pc_query_emit_start()
141 pc->emit_instance(ctx, group->se, group->instance); in r600_pc_query_emit_start()
144 pc->emit_select(ctx, block, group->num_counters, group->selectors); in r600_pc_query_emit_start()
159 struct r600_pc_group *group; in r600_pc_query_emit_stop() local
163 for (group = query->groups; group; group = group->next) { in r600_pc_query_emit_stop()
164 struct r600_perfcounter_block *block = group->block; in r600_pc_query_emit_stop()
165 unsigned se = group->se >= 0 ? group->se : 0; in r600_pc_query_emit_stop()
168 if ((block->flags & R600_PC_BLOCK_SE) && (group->se < 0)) in r600_pc_query_emit_stop()
172 unsigned instance = group->instance >= 0 ? group->instance : 0; in r600_pc_query_emit_stop()
177 group->num_counters, group->selectors, in r600_pc_query_emit_stop()
179 va += sizeof(uint64_t) * group->num_counters; in r600_pc_query_emit_stop()
180 } while (group->instance < 0 && ++instance < block->num_instances); in r600_pc_query_emit_stop()
234 struct r600_pc_group *group = query->groups; in get_group_state() local
236 while (group) { in get_group_state()
237 if (group->block == block && group->sub_gid == sub_gid) in get_group_state()
238 return group; in get_group_state()
239 group = group->next; in get_group_state()
242 group = CALLOC_STRUCT(r600_pc_group); in get_group_state()
243 if (!group) in get_group_state()
246 group->block = block; in get_group_state()
247 group->sub_gid = sub_gid; in get_group_state()
265 FREE(group); in get_group_state()
278 group->se = sub_gid / block->num_instances; in get_group_state()
281 group->se = -1; in get_group_state()
285 group->instance = sub_gid; in get_group_state()
287 group->instance = -1; in get_group_state()
290 group->next = query->groups; in get_group_state()
291 query->groups = group; in get_group_state()
293 return group; in get_group_state()
304 struct r600_pc_group *group; in si_create_batch_query() local
336 group = get_group_state(screen, query, block, sub_gid); in si_create_batch_query()
337 if (!group) in si_create_batch_query()
340 if (group->num_counters >= block->num_counters) { in si_create_batch_query()
346 group->selectors[group->num_counters] = sub_index; in si_create_batch_query()
347 ++group->num_counters; in si_create_batch_query()
358 for (group = query->groups; group; group = group->next) { in si_create_batch_query()
359 struct r600_perfcounter_block *block = group->block; in si_create_batch_query()
363 if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0) in si_create_batch_query()
365 if (group->instance < 0) in si_create_batch_query()
368 group->result_base = i; in si_create_batch_query()
369 query->b.result_size += sizeof(uint64_t) * instances * group->num_counters; in si_create_batch_query()
370 i += instances * group->num_counters; in si_create_batch_query()
372 pc->get_size(block, group->num_counters, group->selectors, in si_create_batch_query()
398 group = get_group_state(screen, query, block, sub_gid); in si_create_batch_query()
399 assert(group != NULL); in si_create_batch_query()
401 for (j = 0; j < group->num_counters; ++j) { in si_create_batch_query()
402 if (group->selectors[j] == sub_index) in si_create_batch_query()
406 counter->base = group->result_base + j; in si_create_batch_query()
407 counter->stride = group->num_counters; in si_create_batch_query()
410 if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0) in si_create_batch_query()
412 if (group->instance < 0) in si_create_batch_query()