Lines Matching defs:history
39 * we have to maintaining some amount of locking history table,
48 /* Dump history entries on autotuner finish,
65 /* We would delete old history entries */
170 free_history(struct tu_device *dev, struct tu_renderpass_history *history)
172 tu_autotune_free_results_locked(dev, &history->results);
173 free(history);
188 struct tu_renderpass_history *history = entry->data;
189 if (history->num_results > 0) {
190 *avg_samples = p_atomic_read(&history->avg_samples);
209 history_add_result(struct tu_device *dev, struct tu_renderpass_history *history,
213 list_add(&result->node, &history->results);
215 if (history->num_results < MAX_HISTORY_RESULTS) {
216 history->num_results++;
222 list_last_entry(&history->results, struct tu_renderpass_result, node);
228 /* Do calculations here to avoid locking history in tu_autotune_use_bypass */
231 &history->results, node) {
235 float avg_samples = (float)total_samples / (float)history->num_results;
236 p_atomic_set(&history->avg_samples, (uint32_t)avg_samples);
249 struct tu_renderpass_history *history = result->history;
253 history_add_result(dev, history, result);
304 /* Create history entries here to minimize work and locking being
311 struct tu_renderpass_history *history;
315 history = calloc(1, sizeof(*history));
316 history->key = result->rp_key;
317 list_inithead(&history->results);
320 _mesa_hash_table_insert(at->ht, &history->key, history);
323 history = (struct tu_renderpass_history *) entry->data;
326 history->last_fence = new_fence;
329 result->history = history;
350 mesa_logi("Total history entries: %u", at->ht->entries);
352 /* Cleanup old entries from history table. The assumption
357 struct tu_renderpass_history *history = entry->data;
358 if (history->last_fence == 0 ||
359 gpu_fence < history->last_fence ||
360 (gpu_fence - history->last_fence) <= MAX_HISTORY_LIFETIME)
364 mesa_logi("Removed old history entry %016"PRIx64"", history->key);
367 _mesa_hash_table_remove_key(at->ht, &history->key);
371 free_history(dev, history);
416 struct tu_renderpass_history *history = entry->data;
419 history->key, history->avg_samples, history->num_results);
427 struct tu_renderpass_history *history = entry->data;
428 free_history(dev, history);