mbox series

[v2,0/2] ui/cocoa: updateUIInfo threading, autorelease pools

Message ID 20220224101330.967429-1-peter.maydell@linaro.org
Headers show
Series ui/cocoa: updateUIInfo threading, autorelease pools | expand

Message

Peter Maydell Feb. 24, 2022, 10:13 a.m. UTC
This patchset was originally provoked by Akihiko Odaki noting
that we have some unnecessary creation and deletion of autorelease
pools in the Cocoa UI code. Patch 2 deletes them; but to get there
we need to do a bit of cleanup of the updateUIInfo support,
which wasn't considering threads.

Tested only very lightly.

v1->v2 changes:
 * name method updateUIInfoLocked, to match existing handleEventLocked
 * don't call updateUIInfo in cocoa_display_init() -- this happens
   indirectly as a result of register_displaychangelistener()

thanks
-- PMM

Peter Maydell (2):
  ui/cocoa.m: Fix updateUIInfo threading issues
  ui/cocoa.m: Remove unnecessary NSAutoreleasePools

 ui/cocoa.m | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

Comments

Akihiko Odaki Feb. 24, 2022, 11:46 a.m. UTC | #1
Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Tested-by: Akihiko Odaki <akihiko.odaki@gmail.com>

On 2022/02/24 19:13, Peter Maydell wrote:
> This patchset was originally provoked by Akihiko Odaki noting
> that we have some unnecessary creation and deletion of autorelease
> pools in the Cocoa UI code. Patch 2 deletes them; but to get there
> we need to do a bit of cleanup of the updateUIInfo support,
> which wasn't considering threads.
> 
> Tested only very lightly.
> 
> v1->v2 changes:
>   * name method updateUIInfoLocked, to match existing handleEventLocked
>   * don't call updateUIInfo in cocoa_display_init() -- this happens
>     indirectly as a result of register_displaychangelistener()
> 
> thanks
> -- PMM
> 
> Peter Maydell (2):
>    ui/cocoa.m: Fix updateUIInfo threading issues
>    ui/cocoa.m: Remove unnecessary NSAutoreleasePools
> 
>   ui/cocoa.m | 31 ++++++++++++++++++++++---------
>   1 file changed, 22 insertions(+), 9 deletions(-)
>