From patchwork Thu Feb 24 10:13:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 545575 Delivered-To: patch@linaro.org Received: by 2002:ac0:d8d1:0:0:0:0:0 with SMTP id b17csp53038imj; Thu, 24 Feb 2022 02:17:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5iOAhTrJhvPRXh/BKYulnh1B12rPFosIO2zOLMnV+4COj0WPWSgzHUEmSIE7mpslBetIW X-Received: by 2002:a05:622a:13c6:b0:2d6:75cf:cc23 with SMTP id p6-20020a05622a13c600b002d675cfcc23mr1527514qtk.473.1645697834305; Thu, 24 Feb 2022 02:17:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645697834; cv=none; d=google.com; s=arc-20160816; b=jbOXJhOlEWk9MsjeINGVPJAJww7vQwizrCfahkKjIp6rls7NaBc2twXsagpD5c4oqZ nvSWDh7pvKnQyZqwjGo7Br2WqD8IGphoK2BEKbNdvo1dBvJgowcapftRkSyHNovp28p4 L6XFX3sM/LCXOZkitjxn96K6rWUvfxjaXrZeMW5SjZeuow8y8qPZ+G0fqvjHkNB+1m1p ijt+7KYUGJFtCCCHGZMv7JNqwFTBQTuI97B90toLY6NccirhxdzqKn96CGAgnPwhmcc1 c26JXjUaKrTuNUFqS+Z8TlUXbSsv+W3ddzZRDzMqoZEnhTR0TAL1/fOq/gnWYzKn91nF NFAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=EsyiBPgCFC6wledU7ZEnsllUL+n5oPFr3d0oI4Sfhe4=; b=g0XTZEzx+db6orj04+YxwYbn5nyunt8wk+4QBFk32FphuUpSRxmldBRSmM4m2P5yb/ QvZO0EwItWPqXpmFl8wTI+EYiukp0eClBjiAjF13gXnRnvcr4XibDfBtDZoLngbnlick 6g9f/yNWngUCvwupc6gve+OqYL4lp0/SulXpmTg6sFa1/YBWS3GoCzODUHJ803pTM0+P oMHWSfbXHZE5dZ3qN8ft4H65ohF4OFtUFFY0v0OGLNC+MCwgOJ57/lBt1bq7bbucBip6 Cpsaeg9gv6lxcFUjPpRZPYwqpLO+yzAQjyoSC2koXoGztwmSQNSYa9VyTSYX1Lqum5su 7zhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eKA6c4g9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u3si911872qtg.424.2022.02.24.02.17.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Feb 2022 02:17:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eKA6c4g9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNBBR-0007Hv-Tr for patch@linaro.org; Thu, 24 Feb 2022 05:17:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNB82-0007Gr-K9 for qemu-devel@nongnu.org; Thu, 24 Feb 2022 05:13:42 -0500 Received: from [2a00:1450:4864:20::431] (port=37498 helo=mail-wr1-x431.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNB80-0008B9-9F for qemu-devel@nongnu.org; Thu, 24 Feb 2022 05:13:41 -0500 Received: by mail-wr1-x431.google.com with SMTP id d28so2168860wra.4 for ; Thu, 24 Feb 2022 02:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EsyiBPgCFC6wledU7ZEnsllUL+n5oPFr3d0oI4Sfhe4=; b=eKA6c4g9b6hjeEAc5gRtQP1T6AAtpSYG4LHafnXffo2oOte7wNiDBN5vnGdDZycA72 sf5JRQY6rAKlFsqmYh/Cnlz3fJf4n255infE/6jHCruaQFObZQDRoHlK8qbwbLNr2H5M JHHo+pVThhBnysET7vuPSAWVkqIk6Or6bemKNeQn7X6wSaHXOB2avx9XdbNIVLHPq9X/ aJh63E6o42qEWzbu7SMGlbBw8LZkqNwvSQpYeDAd6+7N3fryAqDSpqrTsgrU+yt4/AyK wJfSxhyRr6+D3JJfRa55UQ7fhVc3FuHX/N/Px9J68dtE3VhySn+V1zHRjV2aSmF4hUi7 TM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EsyiBPgCFC6wledU7ZEnsllUL+n5oPFr3d0oI4Sfhe4=; b=JheurHarsiH0Ot2LpPWEgrjHNw3y752/8q2Hfs+FAkzpbvMQE6bhxlGo3Pdm+3Zrs+ AHNxAQszuYFE/TWWd7scbpJ+GQq3HDudEie6WEOCqZEvE9WCiWcxnPad/B1Mdr4rQMg4 +4Vnu5rBzm+/rzpwEN/IC01R4QzanKkIkjQuHzL8o2pDxBLooKPe6e7yqkVz4sqRUrLk HZ/cB4U7uBZxmKk/aFvwXdM6r/zEF6asMwIQJiqNut4xWgekK5b9FliUQhr1NvvDmbkD EC+tfvM6MdATMl2ngpjOwwBbXhdq1nLieNeTzqVxuQCcPSpuGUOdon7aO98Z2rldDRWs OH7A== X-Gm-Message-State: AOAM5306Q8k0wW4SyN5VfAZb0U7LEryQ3nf0XgURLriNWKDBQF41r9Aa LwKdlvSRKLHW5GhyNg+95/GcYWQrfhGWEQ== X-Received: by 2002:a05:6000:2c8:b0:1ea:972b:5476 with SMTP id o8-20020a05600002c800b001ea972b5476mr1661576wry.278.1645697615051; Thu, 24 Feb 2022 02:13:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id y12sm2667688wrl.81.2022.02.24.02.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 02:13:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v2 0/2] ui/cocoa: updateUIInfo threading, autorelease pools Date: Thu, 24 Feb 2022 10:13:28 +0000 Message-Id: <20220224101330.967429-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::431 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki