diff options
| author | Tvrtko Ursulin <tvrtko.ursulin@igalia.com> | 2025-09-19 14:15:30 +0100 |
|---|---|---|
| committer | Tvrtko Ursulin <tursulin@ursulin.net> | 2025-12-03 14:48:47 +0000 |
| commit | c06da4b3573a2d3c906c185450d0b1059d02820e (patch) | |
| tree | 45cd19d0f106e04f89832be950834240628196d9 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 802620f5a9cf7231933cfce61817577b3b6543d9 (diff) | |
drm/ttm: Tidy usage of local variables a little bit
At the moment the TTM code has a few places which exibit sub-optimal
patterns regarding local variable usage:
* Having a local with some object cached but not always using it.
* Having a local for a single use object member access.
* Failed opportunities to use a local to cache a pointer.
Lets tidy this a little bit and apply some more consistency.
It is mostly for consistency and redability but I have also checked that
there are not negative code generation effects. In fact there are more
positives:
add/remove: 0/0 grow/shrink: 3/9 up/down: 12/-175 (-163)
Function old new delta
ttm_pool_restore_and_alloc 415 423 +8
ttm_bo_vunmap 147 149 +2
ttm_bo_evict 521 523 +2
ttm_bo_vm_fault_reserved 972 970 -2
ttm_bo_vm_dummy_page 155 152 -3
ttm_bo_vm_fault 203 196 -7
ttm_bo_populate 158 150 -8
ttm_bo_move_memcpy 600 592 -8
ttm_bo_kmap 667 644 -23
ttm_bo_shrink 333 305 -28
ttm_bo_release 750 720 -30
ttm_bo_swapout_cb 691 625 -66
Total: Before=42717, After=42554, chg -0.38%
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://lore.kernel.org/r/20250919131530.91247-5-tvrtko.ursulin@igalia.com
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
[tursulin: fixup conflict in ttm_bo_move_pipeline_evict]
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
