[{"id":1768036,"web_url":"http://patchwork.ozlabs.org/comment/1768036/","msgid":"<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>","list_archive_url":null,"date":"2017-09-13T17:09:09","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":72104,"url":"http://patchwork.ozlabs.org/api/people/72104/","name":"Richard Henderson","email":"richard.henderson@linaro.org"},"content":"On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n> TCG BBLs and instructions have multiple exit points from where to raise\n> tracing events, but some of the necessary information in the generic\n> disassembly infrastructure is not available until after generating these\n> exit points.\n> \n> This patch adds support for \"inline points\" (where the tracing code will\n> be placed), and \"inline regions\" (which identify the TCG code that must\n> be inlined). The TCG compiler will basically copy each inline region to\n> any inline points that reference it.\n\nI am not keen on this.\n\nIs there a reason you can't just emit the tracing code at the appropriate place\nto begin with?  Perhaps I have to wait to see how this is used...\n\n\nr~","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"RUvk3/0V\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsp7b3bkFz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 03:10:03 +1000 (AEST)","from localhost ([::1]:43717 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsBAn-0001fY-G4\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 13:10:01 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58526)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dsBA3-0001YW-Py\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:09:16 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dsBA1-0007UT-3F\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:09:15 -0400","from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:46716)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1dsBA0-0007TD-T9\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:09:13 -0400","by mail-pf0-x235.google.com with SMTP id e199so1194469pfh.3\n\tfor <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 10:09:12 -0700 (PDT)","from bigtime.twiddle.net (97-126-103-167.tukw.qwest.net.\n\t[97.126.103.167]) by smtp.gmail.com with ESMTPSA id\n\tn12sm26875293pfb.131.2017.09.13.10.09.10\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 10:09:11 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=2UvU0FU46QpORHB3r7IxA3KCVLDAn1lSbsRaCe/nHSo=;\n\tb=RUvk3/0V/oooAflBnphkFpUe+iNkT56g8lr8ckjb+wt4j8lBmmrVRdzfHLDowZ1JOh\n\t/m3PO60GdP63+eB5umwnpeVhUCIfO1EX81Gxjazrzi0FOYrZOb5HJoO/+KqBg0WUaOG0\n\tsk1JWo7n8A1BgxJswtsrLW5cGqzKiwO1tLsdk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=2UvU0FU46QpORHB3r7IxA3KCVLDAn1lSbsRaCe/nHSo=;\n\tb=lGPvEaJoOgeOem3+vF63pV4/ili+LFH0fFBVwiMrgBNRtkMtBLIa8r9AaE0qe1N1nN\n\trN6Pt7tfH0BkCb/Bs7dSnBUZtISlhjv6E3oZy7QETTW7J7Af3Qdvpp+2J8cxR8iXzfzm\n\thmdCZ/lVAUVjeJ6OVZBefLSOgRuiCQJFUxtb2q4/Bd12trQTbQfQpCO9GKY9Iy0/r4dH\n\ttXCm/iIUZ/WnZQBuqjto9MpdtFch7gBMGVuvbp3s75eYY1Qwr6Gd/pAnMrk/4Vz26AlQ\n\tvMtuhPro4w+l4QQsdVl5jk2PIio63L4vlpd9sYSgP/BRMGyTZ0dWnK9MPGL/gIiE6VHc\n\tI2XQ==","X-Gm-Message-State":"AHPjjUi9UVh7rFQnf3EucWPfUNbbefRAaVk2NmFCDERrzfspNvyfTLCG\n\t/Rn6OgEMgQlpxU4a","X-Google-Smtp-Source":"ADKCNb7053U22LA0Te+XeVu/kn2KsVD4/1YSrwhfc7LoLIW8SdqHvgPbjWVwm/Yk6t/+kLAFkuIfeg==","X-Received":"by 10.98.200.153 with SMTP id i25mr19180630pfk.248.1505322551963;\n\tWed, 13 Sep 2017 10:09:11 -0700 (PDT)","To":"=?utf-8?q?Llu=C3=ADs_Vilanova?= <vilanova@ac.upc.edu>,\n\tqemu-devel@nongnu.org","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>","From":"Richard Henderson <richard.henderson@linaro.org>","Message-ID":"<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>","Date":"Wed, 13 Sep 2017 10:09:09 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<150506083546.19604.543091497330269756.stgit@frigg.lan>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c00::235","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Stefan Hajnoczi <stefanha@redhat.com>,\n\tRichard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768668,"web_url":"http://patchwork.ozlabs.org/comment/1768668/","msgid":"<87a81xpasb.fsf@frigg.lan>","list_archive_url":null,"date":"2017-09-14T15:20:04","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":9099,"url":"http://patchwork.ozlabs.org/api/people/9099/","name":"Lluís Vilanova","email":"vilanova@ac.upc.edu"},"content":"Richard Henderson writes:\n\n> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n>> TCG BBLs and instructions have multiple exit points from where to raise\n>> tracing events, but some of the necessary information in the generic\n>> disassembly infrastructure is not available until after generating these\n>> exit points.\n>> \n>> This patch adds support for \"inline points\" (where the tracing code will\n>> be placed), and \"inline regions\" (which identify the TCG code that must\n>> be inlined). The TCG compiler will basically copy each inline region to\n>> any inline points that reference it.\n\n> I am not keen on this.\n\n> Is there a reason you can't just emit the tracing code at the appropriate place\n> to begin with?  Perhaps I have to wait to see how this is used...\n\nAs I tried to briefly explain on next patch, the main problem without inlining\nis that we will see guest_tb_after_trans twice on the trace for each TB in\nconditional instructions on the guest, since they have two exit points (which we\ncapture when emitting goto_tb in TCG).\n\nWe cannot instead emit it only once by overloading the brcond opcode in TCG,\nsince that can be used internally in the guest instruction emulation without\nnecessarily ending a TB (or we could have more than one brcond for a single\ninstruction).\n\nI hope it's clearer now.\n\n\nThanks,\n  Lluis","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtMgD2g5mz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 01:20:56 +1000 (AEST)","from localhost ([::1]:48379 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsVwk-0002lF-Fe\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 11:20:54 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41603)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsVwB-0002ci-0Z\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:20:19 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsVw8-0005Gm-Cn\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:20:18 -0400","from roura.ac.upc.es ([147.83.33.10]:53467)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsVw8-0005Ct-2Q\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:20:16 -0400","from correu-2.ac.upc.es (correu-2.ac.upc.es [147.83.30.92])\n\tby roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v8EFKA0F019994;\n\tThu, 14 Sep 2017 17:20:10 +0200","from localhost (unknown [132.68.50.201])\n\tby correu-2.ac.upc.es (Postfix) with ESMTPSA id 60E9E203;\n\tThu, 14 Sep 2017 17:20:05 +0200 (CEST)"],"From":"=?utf-8?q?Llu=C3=ADs_Vilanova?= <vilanova@ac.upc.edu>","To":"Richard Henderson <richard.henderson@linaro.org>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>\n\t<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>","Mail-Followup-To":"Richard Henderson <richard.henderson@linaro.org>,\n\tqemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>, Richard\n\tHenderson <rth@twiddle.net>","Date":"Thu, 14 Sep 2017 18:20:04 +0300","In-Reply-To":"<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org> (Richard\n\tHenderson's message of \"Wed, 13 Sep 2017 10:09:09 -0700\")","Message-ID":"<87a81xpasb.fsf@frigg.lan>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]","X-Received-From":"147.83.33.10","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,\n\tRichard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768708,"web_url":"http://patchwork.ozlabs.org/comment/1768708/","msgid":"<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net>","list_archive_url":null,"date":"2017-09-14T16:15:18","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":2222,"url":"http://patchwork.ozlabs.org/api/people/2222/","name":"Richard Henderson","email":"rth@twiddle.net"},"content":"On 09/14/2017 08:20 AM, Lluís Vilanova wrote:\n> Richard Henderson writes:\n> \n>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n>>> TCG BBLs and instructions have multiple exit points from where to raise\n>>> tracing events, but some of the necessary information in the generic\n>>> disassembly infrastructure is not available until after generating these\n>>> exit points.\n>>>\n>>> This patch adds support for \"inline points\" (where the tracing code will\n>>> be placed), and \"inline regions\" (which identify the TCG code that must\n>>> be inlined). The TCG compiler will basically copy each inline region to\n>>> any inline points that reference it.\n> \n>> I am not keen on this.\n> \n>> Is there a reason you can't just emit the tracing code at the appropriate place\n>> to begin with?  Perhaps I have to wait to see how this is used...\n> \n> As I tried to briefly explain on next patch, the main problem without inlining\n> is that we will see guest_tb_after_trans twice on the trace for each TB in\n> conditional instructions on the guest, since they have two exit points (which we\n> capture when emitting goto_tb in TCG).\n\nWithout seeing the code, I suspect this is because you didn't examine the\nargument to tcg_gen_exit_tb.  You can tell when goto_tb must have been emitted\nand avoid logging twice.\n\n\nr~","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"pMxvEetg\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtNtV56bhz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 02:15:46 +1000 (AEST)","from localhost ([::1]:48803 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsWno-0005ab-Ri\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 12:15:44 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45396)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dsWnU-0005aR-VA\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 12:15:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dsWnR-0006uO-PG\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 12:15:24 -0400","from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35159)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1dsWnR-0006tP-KA\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 12:15:21 -0400","by mail-pf0-x242.google.com with SMTP id i23so1700581pfi.2\n\tfor <qemu-devel@nongnu.org>; Thu, 14 Sep 2017 09:15:21 -0700 (PDT)","from bigtime.twiddle.net (97-126-103-167.tukw.qwest.net.\n\t[97.126.103.167]) by smtp.googlemail.com with ESMTPSA id\n\tj68sm28637372pfa.93.2017.09.14.09.15.19\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 14 Sep 2017 09:15:20 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=sCQIz7yZXOawzPdUn543Dyz7LQ1TaBbAGGNg3P/M8d8=;\n\tb=pMxvEetgedkdTelXnXT8/ciyDBr2oTj9tWsJmTh9iNkBUSrhBU3OlDmGSo2kU19uXu\n\tHVko1XbRCHXj41al2T0kq1CnIXhgE08s35DiIyU2+kRtr8mTYPmcVspXBEv21xikE22C\n\tI/JzZGJArZLkM3/0tbado76GQARX55l0Lj2JZyMuPaOeF1OcoziLVxXLnOm1aSjzX336\n\tgZJKIbG7FxgNzyTEwZfjME82DVbZJJ7ZQUVlN6yB/XJYret/SfxEeaGon1YeVakLqP/A\n\tUvXKoMFxoIAMBwFZXJTlqCDdBHdAoEspgL2QWrRd3HZcuNc2uxYnxZEEOfCmrjNxMdsB\n\tGLdg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=sCQIz7yZXOawzPdUn543Dyz7LQ1TaBbAGGNg3P/M8d8=;\n\tb=BcVvKGgo9FTCVlAzyk53dg6LCzhkrQydZCcBtVLaqtyqZiVm0zbC5lHKqYwa7oX0qE\n\tRBDbX1Gq60Xv+y5XQNRp9WASy7vcrTCPwRn4omCSybXlHXJr88dlVjLkE/u14sup0I/B\n\tmSxyBj+iOhLIbHslcg9pz83E/smEq5UYtmoF++xuHeUYv5o3pcqBWG1D5brf0STO8NZD\n\tZH07z8AyMNgH45/7rO/aY/bXFq3uhg+hwmFZC3o+YwO8FVmxiododjyZkgobx/TOT9fY\n\t+GPqK+7RkF7OPbyg67JLe4MzDZxi4Kf4aTBHjdZ/8+tIOfukBc8r6+qHNmjIIho/icAH\n\tFEfw==","X-Gm-Message-State":"AHPjjUjJM+0VhxLUcR/vMRQcN69q5O+roXyZccMyoKhAhz3BoCVkWd1G\n\t7gQCuOXFQoj85w==","X-Google-Smtp-Source":"ADKCNb4oNfswIlmDRr2C8qRCvTRDCxcAj5hSIl/lGkRdlabLLsfcvCwUo3wYrq5qAL92mAuwJCc8+A==","X-Received":"by 10.84.218.7 with SMTP id q7mr25118484pli.111.1505405720746;\n\tThu, 14 Sep 2017 09:15:20 -0700 (PDT)","To":"Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org, \n\tStefan Hajnoczi <stefanha@redhat.com>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>\n\t<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>\n\t<87a81xpasb.fsf@frigg.lan>","From":"Richard Henderson <rth@twiddle.net>","Message-ID":"<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net>","Date":"Thu, 14 Sep 2017 09:15:18 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<87a81xpasb.fsf@frigg.lan>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c00::242","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1769165,"web_url":"http://patchwork.ozlabs.org/comment/1769165/","msgid":"<87ingki0je.fsf@frigg.lan>","list_archive_url":null,"date":"2017-09-15T12:55:33","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":9099,"url":"http://patchwork.ozlabs.org/api/people/9099/","name":"Lluís Vilanova","email":"vilanova@ac.upc.edu"},"content":"Richard Henderson writes:\n\n> On 09/14/2017 08:20 AM, Lluís Vilanova wrote:\n>> Richard Henderson writes:\n>> \n>>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n>>>> TCG BBLs and instructions have multiple exit points from where to raise\n>>>> tracing events, but some of the necessary information in the generic\n>>>> disassembly infrastructure is not available until after generating these\n>>>> exit points.\n>>>> \n>>>> This patch adds support for \"inline points\" (where the tracing code will\n>>>> be placed), and \"inline regions\" (which identify the TCG code that must\n>>>> be inlined). The TCG compiler will basically copy each inline region to\n>>>> any inline points that reference it.\n>> \n>>> I am not keen on this.\n>> \n>>> Is there a reason you can't just emit the tracing code at the appropriate place\n>>> to begin with?  Perhaps I have to wait to see how this is used...\n>> \n>> As I tried to briefly explain on next patch, the main problem without inlining\n>> is that we will see guest_tb_after_trans twice on the trace for each TB in\n>> conditional instructions on the guest, since they have two exit points (which we\n>> capture when emitting goto_tb in TCG).\n\n> Without seeing the code, I suspect this is because you didn't examine the\n> argument to tcg_gen_exit_tb.  You can tell when goto_tb must have been emitted\n> and avoid logging twice.\n\nThe generated tracing code for 'guest_*_after' must be right before the\n\"goto_tb\" opcode at the end of a TB (AFAIU generated by\ntcg_gen_lookup_and_goto_ptr()), and we have two of those when decoding a guest\nconditional jump.\n\nIf we couple this with the semantics of the trace_*_tcg functions (trace the\nevent at translation time, and generate TCG code to trace the event at execution\ntime), we get the case I described (we don't want to call trace_tb_after_tcg()\nor trace_insn_after_tcg() twice for the same TB or instruction).\n\nThat is, unless I've missed something.\n\n\nThe only alternative I can think of is changing tracetool to offer an additional\nAPI that provides separate functions for translation-time tracing and\nexecution-time generation. So from this:\n\n  static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n  {\n      trace_event_trans(cpu, ...);\n      if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n          gen_helper_trace_event_exec(env, ...);\n      }\n  }\n\nWe can extend it into this:\n\n  static inline void gen_trace_event_exec(TCGv_env env, ...)\n      if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n          gen_helper_trace_event_exec(env, ...);\n      }\n  }\n  static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n  {\n      trace_event_trans(cpu, ...);\n      gen_trace_event_exec(env, ...);\n  }\n\n\nCheers,\n  Lluis","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtwPs0ZBLz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 22:56:17 +1000 (AEST)","from localhost ([::1]:53268 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsqAJ-0000Vl-5R\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 08:56:15 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36682)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsq9s-0000VY-Nc\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 08:55:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsq9n-0004oC-Hm\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 08:55:48 -0400","from roura.ac.upc.es ([147.83.33.10]:54984)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dsq9m-0004nG-T2\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 08:55:43 -0400","from correu-1.ac.upc.es (correu-1.ac.upc.es [147.83.30.91])\n\tby roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v8FCtecf017096;\n\tFri, 15 Sep 2017 14:55:40 +0200","from localhost (unknown [132.68.50.201])\n\tby correu-1.ac.upc.es (Postfix) with ESMTPSA id D577A302;\n\tFri, 15 Sep 2017 14:55:34 +0200 (CEST)"],"From":"=?utf-8?q?Llu=C3=ADs_Vilanova?= <vilanova@ac.upc.edu>","To":"Richard Henderson <rth@twiddle.net>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>\n\t<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>\n\t<87a81xpasb.fsf@frigg.lan>\n\t<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net>","Mail-Followup-To":"Richard Henderson <rth@twiddle.net>, Richard Henderson\n\t<richard.henderson@linaro.org>, qemu-devel@nongnu.org, Stefan Hajnoczi\n\t<stefanha@redhat.com>","Date":"Fri, 15 Sep 2017 15:55:33 +0300","In-Reply-To":"<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net> (Richard\n\tHenderson's message of \"Thu, 14 Sep 2017 09:15:18 -0700\")","Message-ID":"<87ingki0je.fsf@frigg.lan>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]","X-Received-From":"147.83.33.10","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org, \n\tStefan Hajnoczi <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1775669,"web_url":"http://patchwork.ozlabs.org/comment/1775669/","msgid":"<87poadto9u.fsf@frigg.lan>","list_archive_url":null,"date":"2017-09-26T16:31:25","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":9099,"url":"http://patchwork.ozlabs.org/api/people/9099/","name":"Lluís Vilanova","email":"vilanova@ac.upc.edu"},"content":"Lluís Vilanova writes:\n\n> Richard Henderson writes:\n>> On 09/14/2017 08:20 AM, Lluís Vilanova wrote:\n>>> Richard Henderson writes:\n>>> \n>>>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n>>>>> TCG BBLs and instructions have multiple exit points from where to raise\n>>>>> tracing events, but some of the necessary information in the generic\n>>>>> disassembly infrastructure is not available until after generating these\n>>>>> exit points.\n>>>>> \n>>>>> This patch adds support for \"inline points\" (where the tracing code will\n>>>>> be placed), and \"inline regions\" (which identify the TCG code that must\n>>>>> be inlined). The TCG compiler will basically copy each inline region to\n>>>>> any inline points that reference it.\n>>> \n>>>> I am not keen on this.\n>>> \n>>>> Is there a reason you can't just emit the tracing code at the appropriate place\n>>>> to begin with?  Perhaps I have to wait to see how this is used...\n>>> \n>>> As I tried to briefly explain on next patch, the main problem without inlining\n>>> is that we will see guest_tb_after_trans twice on the trace for each TB in\n>>> conditional instructions on the guest, since they have two exit points (which we\n>>> capture when emitting goto_tb in TCG).\n\n>> Without seeing the code, I suspect this is because you didn't examine the\n>> argument to tcg_gen_exit_tb.  You can tell when goto_tb must have been emitted\n>> and avoid logging twice.\n\n> The generated tracing code for 'guest_*_after' must be right before the\n> \"goto_tb\" opcode at the end of a TB (AFAIU generated by\n> tcg_gen_lookup_and_goto_ptr()), and we have two of those when decoding a guest\n> conditional jump.\n\n> If we couple this with the semantics of the trace_*_tcg functions (trace the\n> event at translation time, and generate TCG code to trace the event at execution\n> time), we get the case I described (we don't want to call trace_tb_after_tcg()\n> or trace_insn_after_tcg() twice for the same TB or instruction).\n\n> That is, unless I've missed something.\n\n\n> The only alternative I can think of is changing tracetool to offer an additional\n> API that provides separate functions for translation-time tracing and\n> execution-time generation. So from this:\n\n>   static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n>   {\n>       trace_event_trans(cpu, ...);\n>       if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n>           gen_helper_trace_event_exec(env, ...);\n>       }\n>   }\n\n> We can extend it into this:\n\n>   static inline void gen_trace_event_exec(TCGv_env env, ...)\n>       if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n>           gen_helper_trace_event_exec(env, ...);\n>       }\n>   }\n>   static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n>   {\n>       trace_event_trans(cpu, ...);\n>       gen_trace_event_exec(env, ...);\n>   }\n\nRichard, do you prefer to keep the \"TCG inline\" feature or switch the internal\ntracing API to this second approach?\n\n\nThanks,\n  Lluis","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1mgx60FGz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 02:32:11 +1000 (AEST)","from localhost ([::1]:50235 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwsmE-0004cr-FO\n\tfor incoming@patchwork.ozlabs.org; Tue, 26 Sep 2017 12:32:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41842)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dwslo-0004cB-Ua\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:31:41 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dwslj-0004ND-7q\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:31:40 -0400","from roura.ac.upc.es ([147.83.33.10]:44104)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1dwsli-0004ME-SP\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:31:35 -0400","from correu-1.ac.upc.es (correu-1.ac.upc.es [147.83.30.91])\n\tby roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v8QGVWs6023947;\n\tTue, 26 Sep 2017 18:31:32 +0200","from localhost (unknown [132.68.50.201])\n\tby correu-1.ac.upc.es (Postfix) with ESMTPSA id 999BA1375;\n\tTue, 26 Sep 2017 18:31:26 +0200 (CEST)"],"From":"=?utf-8?q?Llu=C3=ADs_Vilanova?= <vilanova@ac.upc.edu>","To":"Richard Henderson <rth@twiddle.net>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>\n\t<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>\n\t<87a81xpasb.fsf@frigg.lan>\n\t<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net>\n\t<87ingki0je.fsf@frigg.lan>","Mail-Followup-To":"Richard Henderson <rth@twiddle.net>, Richard Henderson\n\t<richard.henderson@linaro.org>, qemu-devel@nongnu.org, Stefan Hajnoczi\n\t<stefanha@redhat.com>","Date":"Tue, 26 Sep 2017 19:31:25 +0300","In-Reply-To":"<87ingki0je.fsf@frigg.lan> ( =?utf-8?b?IkxsdcOtcw==?=\n\tVilanova\"'s message of \"Fri, 15 Sep 2017 15:55:33 +0300\")","Message-ID":"<87poadto9u.fsf@frigg.lan>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]","X-Received-From":"147.83.33.10","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org, \n\tStefan Hajnoczi <stefanha@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1775686,"web_url":"http://patchwork.ozlabs.org/comment/1775686/","msgid":"<a6221cd2-6ce2-bad0-2e70-31961e23f448@twiddle.net>","list_archive_url":null,"date":"2017-09-26T16:52:58","subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","submitter":{"id":2222,"url":"http://patchwork.ozlabs.org/api/people/2222/","name":"Richard Henderson","email":"rth@twiddle.net"},"content":"On 09/26/2017 09:31 AM, Lluís Vilanova wrote:\n> Lluís Vilanova writes:\n> \n>> Richard Henderson writes:\n>>> On 09/14/2017 08:20 AM, Lluís Vilanova wrote:\n>>>> Richard Henderson writes:\n>>>>\n>>>>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:\n>>>>>> TCG BBLs and instructions have multiple exit points from where to raise\n>>>>>> tracing events, but some of the necessary information in the generic\n>>>>>> disassembly infrastructure is not available until after generating these\n>>>>>> exit points.\n>>>>>>\n>>>>>> This patch adds support for \"inline points\" (where the tracing code will\n>>>>>> be placed), and \"inline regions\" (which identify the TCG code that must\n>>>>>> be inlined). The TCG compiler will basically copy each inline region to\n>>>>>> any inline points that reference it.\n>>>>\n>>>>> I am not keen on this.\n>>>>\n>>>>> Is there a reason you can't just emit the tracing code at the appropriate place\n>>>>> to begin with?  Perhaps I have to wait to see how this is used...\n>>>>\n>>>> As I tried to briefly explain on next patch, the main problem without inlining\n>>>> is that we will see guest_tb_after_trans twice on the trace for each TB in\n>>>> conditional instructions on the guest, since they have two exit points (which we\n>>>> capture when emitting goto_tb in TCG).\n> \n>>> Without seeing the code, I suspect this is because you didn't examine the\n>>> argument to tcg_gen_exit_tb.  You can tell when goto_tb must have been emitted\n>>> and avoid logging twice.\n> \n>> The generated tracing code for 'guest_*_after' must be right before the\n>> \"goto_tb\" opcode at the end of a TB (AFAIU generated by\n>> tcg_gen_lookup_and_goto_ptr()), and we have two of those when decoding a guest\n>> conditional jump.\n> \n>> If we couple this with the semantics of the trace_*_tcg functions (trace the\n>> event at translation time, and generate TCG code to trace the event at execution\n>> time), we get the case I described (we don't want to call trace_tb_after_tcg()\n>> or trace_insn_after_tcg() twice for the same TB or instruction).\n> \n>> That is, unless I've missed something.\n> \n> \n>> The only alternative I can think of is changing tracetool to offer an additional\n>> API that provides separate functions for translation-time tracing and\n>> execution-time generation. So from this:\n> \n>>   static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n>>   {\n>>       trace_event_trans(cpu, ...);\n>>       if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n>>           gen_helper_trace_event_exec(env, ...);\n>>       }\n>>   }\n> \n>> We can extend it into this:\n> \n>>   static inline void gen_trace_event_exec(TCGv_env env, ...)\n>>       if (trace_event_get_vcpu_state(cpu, EVENT_EXEC)) {\n>>           gen_helper_trace_event_exec(env, ...);\n>>       }\n>>   }\n>>   static inline void trace_event_tcg(CPUState *cpu, TCGv_env env, ...)\n>>   {\n>>       trace_event_trans(cpu, ...);\n>>       gen_trace_event_exec(env, ...);\n>>   }\n> \n> Richard, do you prefer to keep the \"TCG inline\" feature or switch the internal\n> tracing API to this second approach?\n\nI don't think I fully understand what you're proposing.  The example\ntransformation above is merely syntactic and has no functional change.\n\nAs previously stated, I'm not keen on the \"tcg inline\" approach.  I would\nprefer that you hook into tcg_gen_{exit_tb,goto_tb,goto_ptr} functions within\ntcg/tcg-op.c to log transitions between TBs.\n\n\nr~","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"HYo/cpQ5\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1n8w39NQz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 02:53:52 +1000 (AEST)","from localhost ([::1]:50332 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwt7G-0005qu-9C\n\tfor incoming@patchwork.ozlabs.org; Tue, 26 Sep 2017 12:53:50 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47230)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dwt6Y-0005iN-Ky\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:53:07 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <rth7680@gmail.com>) id 1dwt6V-0003PP-IG\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:53:06 -0400","from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]:56313)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1dwt6V-0003OH-Cg\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 12:53:03 -0400","by mail-pg0-x22d.google.com with SMTP id b11so6221018pgn.12\n\tfor <qemu-devel@nongnu.org>; Tue, 26 Sep 2017 09:53:03 -0700 (PDT)","from bigtime.twiddle.net ([70.35.39.2])\n\tby smtp.googlemail.com with ESMTPSA id\n\ti10sm14945730pgo.71.2017.09.26.09.53.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Sep 2017 09:53:00 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=oE3jHKUy0fWdbGupkqRjV6HdmvZ1roccVJuBLsTUv4k=;\n\tb=HYo/cpQ5YbG/gYeZE506wfIrdzOpzS8rcNzDTUZ7EQ/iCA2zsVbab9HO8vYY1nmX8U\n\t2xyRrIqiTHMwaVS1sJkNfqf6m/sNZqMpVNrvGoubO42oxcQkEpaktugjpEdJEZsbc+jb\n\tPeiCCnx0kFoTbEUNrOGvFm+wSckTUEhm6Kum8xwWHDQHBvvs/1V3uAeuKuZlTdf4882r\n\tELCwtS0VUcHJEYOEoGsFdaqxm7LSXB8TNZ4jU94j1aaBILSM1LnrpepmfFJraPkANnsh\n\tRXTdFj4z4NffGgY2ZT4o/n/utcfgyfXSHkdXTGomAhZTkexo0NFeP6cz1Nef6Z7QMTTt\n\tMEIA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=oE3jHKUy0fWdbGupkqRjV6HdmvZ1roccVJuBLsTUv4k=;\n\tb=iRvBrjRQnN5lw1/MFifs8O6wSujTIfIjEL4+qjMjmdFF2g1oQDFW+Jd4OIC4Cn3kQJ\n\tv0Kr5zBclfEzM99aPUHxcNvdrBWW+cTEWjzEN+sNaV4kpuXQEpeV4UQ9mkenmWXqwf42\n\ttqwdnLJrzgLwKuDJKCE9azyachTlZ5nsHRGT1h0Ytk/GG6Xlie/V9At3vTH56kf4I3Mi\n\tdT9Rvge4S0SdQFtDLIvEQHyEhncRJRXSL0rBcGfROMxZua/pfz3LgOptdLQ+3ESBrs6D\n\tP4hVyPiHOwj5OuuQQnObqPd/54u/LkmsNTr/6zSoGQA4DOn9v1lnMiTwV4sV+Yx6u6MY\n\tvguw==","X-Gm-Message-State":"AHPjjUh5ED1cXUDSTjvBpg+++cMwdgX3kJ4rZAl+6edL08vwaW2EAKcl\n\t1ahAoc2C4m5RZGjLteiONkQ=","X-Google-Smtp-Source":"AOwi7QDZ1/66mEXvRSy33oYyRplZX/90ajk0Vqc3Hn6LHk8LRPCxyuaWAxn/wyVmQBknIrJlbRWedg==","X-Received":"by 10.98.224.143 with SMTP id d15mr11300782pfm.170.1506444782097;\n\tTue, 26 Sep 2017 09:53:02 -0700 (PDT)","To":"Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org, \n\tStefan Hajnoczi <stefanha@redhat.com>","References":"<150505986682.19604.11937392314067517230.stgit@frigg.lan>\n\t<150506083546.19604.543091497330269756.stgit@frigg.lan>\n\t<169db8d7-fe49-05c4-aca7-ad818b12c9c5@linaro.org>\n\t<87a81xpasb.fsf@frigg.lan>\n\t<7e4260a8-89a3-9c52-4f09-afe9035ceac2@twiddle.net>\n\t<87ingki0je.fsf@frigg.lan> <87poadto9u.fsf@frigg.lan>","From":"Richard Henderson <rth@twiddle.net>","Message-ID":"<a6221cd2-6ce2-bad0-2e70-31961e23f448@twiddle.net>","Date":"Tue, 26 Sep 2017 09:52:58 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<87poadto9u.fsf@frigg.lan>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c05::22d","Subject":"Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for \"inlining\"\n\tregions of code","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]