From patchwork Fri Jan 21 16:22:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12719912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA908C433F5 for ; Fri, 21 Jan 2022 16:32:41 +0000 (UTC) Received: from localhost ([::1]:50638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAwq8-00026D-JI for qemu-devel@archiver.kernel.org; Fri, 21 Jan 2022 11:32:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAwmt-0007k5-M3 for qemu-devel@nongnu.org; Fri, 21 Jan 2022 11:29:19 -0500 Received: from mail-eopbgr50099.outbound.protection.outlook.com ([40.107.5.99]:41392 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAwms-0000K1-1R for qemu-devel@nongnu.org; Fri, 21 Jan 2022 11:29:19 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TgtvHV1ccF3RncvvnammwlykKgQ56VlEEzThSnNpC7uINMiRO0e5RIt5fzj13juLDzrAeBSusr1v8UsIQRFHQ3zPWANYqMiBlpJgjrKdHkdDZTqlhVw6PCzbNPVBrjf4cYdB0ZtXLBvyzJOKEDUMSvb5fvEkAhr8vLdPSpVleInmLQAzgRDh69pxc+i44cYRlGotG+pVHA0hiGIVDVuHCTspHZOnd7D670NRONW0o2sY6Vi60wBMnp8JwmSGViNURmdDvNMdhoH84PREgVVDAqJda1iij2/NkZ0sJy9QXvk2mUjPIqFru3fAENhWn7yyFT0iBSTYPafJwXLkIavgHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FVmOjqjGeIEn6B0TpU0M/qpcdKpK/CNW86EF0pnAixc=; b=lywAZJmBPFSpzzrEgrTIMiVujnXYgGT300UeqlMdiZ4UyYx4TVjLc0q0YOGUYs30T3YOu3rbzOIprN1lleDrsjQ99VZnh/AOGzwgW14fsJJ/yC2awdtdKG+RvMbikMx5d6UtASRM5uTARkB7ciXgzW1fy14RpxyR9oJaRd2Bla2E4z88jXzTBVnEXgRSsNmOr+ZJuCG/e/tjdRNcRckAoHCx7WuDox9OWDnz7EPTJDtFBMjKnOw/AYRHxnd21XQ6V14S/OGjlXN1g6dapxXB/dAikXWOzBQtgQ/MYGz0UnTg1pG+HCCuXMCxnshozOGp5mbTYs+orJUb1XNH2JMDEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FVmOjqjGeIEn6B0TpU0M/qpcdKpK/CNW86EF0pnAixc=; b=YDEuXi42lqze20oRJA3XfOPlzm84jvifvHsqKXC0xJ5boMLKI/a3+j9eegAUQ5hjUpbMOPuwQy+7icHWgh3r1LWAITGxv3FcKHWQIKGPwAwPq7WFO22yf8UfC87F7dYBizmRCFbUl2/McbKWAjqW/aMvFspnPmgGxm42SIh+gVI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) by AM6PR08MB4006.eurprd08.prod.outlook.com (2603:10a6:20b:a9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Fri, 21 Jan 2022 16:22:46 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::4def:4b08:dfe6:b4bd]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::4def:4b08:dfe6:b4bd%3]) with mapi id 15.20.4909.012; Fri, 21 Jan 2022 16:22:46 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, michael.roth@amd.com, armbru@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, hreitz@redhat.com, kwolf@redhat.com, pbonzini@redhat.com Subject: [PATCH v4 0/3] trace qmp commands Date: Fri, 21 Jan 2022 17:22:31 +0100 Message-Id: <20220121162234.2707906-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: AM5PR0402CA0016.eurprd04.prod.outlook.com (2603:10a6:203:90::26) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e321aba6-9029-42e6-8be4-08d9dcfa420b X-MS-TrafficTypeDiagnostic: AM6PR08MB4006:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U/fGBNr3eURpPeWRdn+5qzh1xE3ajKZrUUqA9LIJYiCIa2Br8j66ZD0cmQHMEVq1aUGMDGZybdtEeCDqIs+2FlWA9pMmTQlf7/QpJ2+WYc7C8tBO2nGE6rSWPAJuG7PY/vga8aMso0obM27EDfK0wFmCUkXhXDZPeLukK1MA3CsuaUqtIbB5YBEjuqggw27q8WeC/oTEPV3dpQKdpgyLeGHk0la2owZEsPnCg5XErFSjTP8dP8iPVx3GzMMk+/PL3mu/1yPlOQjpHR2daB3g8wPzAR3/Ywk77kATBBVxiEm95mOdgQoh7SmFFGttLj9Y2W6df5rszagaJZhs6PNoh53amXHAqee9L6+m8xh/JqCM5Rf9OvdnNJN9k/iC/zdB04gng5QT7wyk556ih0pMwaCcKgsiyY9oh672flfQy3wnFR0mlCwZJvkDDfrgT8dblUUa7hXoIbK9lVbuxuw4Qa8RWXJGrDRbFt97ErXnDjdwMNThb8KD1ngQVjvlEtPpHAt4SMzRkT6lJGscIARcEohRVWzSvBSlqfOU7BP4QDnec1tfX+S9rdgYRMF/lu1T4VB8B5j4xueDWYCZ1Y9EhH3PIczhAg4P42L1nwkx8exQT3TQjIFouoxtKh4HeTWCjZXQOfDd3AY9bCusoz+sZ642PwU8Kv75ShcyrATw9uFmdKhcFx2fxmBHKEP70Lhtf7MFJN5GJW8tbLDzYczzqQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR08MB6737.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52116002)(6916009)(2616005)(2906002)(6486002)(6512007)(316002)(8676002)(186003)(8936002)(26005)(508600001)(66946007)(66556008)(66476007)(4326008)(83380400001)(6666004)(5660300002)(38100700002)(38350700002)(86362001)(6506007)(1076003)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2uXTTnKz5/GPUeOFey23jYw75+lOulVByRPZu4eKHH6tQF6tOP5ExoeyuigYnkBpH5VqfVp/MoutbtATWPOYNESkWcwm8xjf2pgchT82McEW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50IxDgBZfUQx9LWgYiqE1ZMsxWPO4+II/W0hUX+b9l7Ay8gnCUAEUHGu58fBGQoy0VRw3/WyVrMH8a+GP4UN1qttUhU53PPmbLqkeSJTYnrAbUR8sI09ynbb9uQROQPzaintCopCndRlFt1ooUJwBTyRDli8gLjCLtcE1eHJpa3P3xhxV9N2IQkAlZhaY+0+XV7vb8sPLELemEOcQ/cgZ/6ORJ9D1ohGk0vtpMZTtqJSMnpvwWixw+kDBX3sO24+3fCjhq4j3GHacc5VzaI++lKq3CfIJxjPrvmplnJtlqpZetCWP7vHRuWcGWzKq6dV23cIidTT70qyUB7ZUS3uKkue1GO3SirHuf7u0pcKDjxSKqCmJPtgsZdnsqw9pIEe6uESUCWwq2tQrI1F7m9scG3kYV+7NJRsI36jpNv2jAIeWYkvOd+tkrYwefGxOGkK2LO1+r1KEjoTHN29cnk5g8CWZ5zJl6uyEbtseVh9pQg== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e321aba6-9029-42e6-8be4-08d9dcfa420b X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2022 16:22:45.9654 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PxhwdveA6L/sDtKHbliPYlMLxD39AfYWgQtsWY/be3CW2GBCFE0tqBXnDPpLihaC/yAQxNnnQwWKtdT+j/7y+pYIRP6l0M0uP7/csibP/NM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4006 Received-SPF: pass client-ip=40.107.5.99; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-VE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi all! This series aims to add trace points for each qmp command with help of qapi code generator. v4: 01: - better commit message - add QAPIGenTrace subclass of QAPIGen with _top() - make trace module optional: we need it only for commands, not for other QAPI targets (like events). Avoid creating a lot of extera .trace-events files. 02: - As we want to generate traces by default, in this patch we only update gen_commands() function. - fix style - add comment about c_name usage, add protect=False 03: - Now option disables trace generation, so option is added in this patch - Update documentation - Update comment on qapi / trace sequence Vladimir Sementsov-Ogievskiy (3): scripts/qapi/gen.py: add FOO.trace-events output module scripts/qapi/commands: gen_commands(): add add_trace_events arg meson: generate trace events for qmp commands docs/devel/qapi-code-gen.rst | 23 +++++++- meson.build | 3 ++ qapi/meson.build | 7 +++ qga/meson.build | 11 +++- scripts/qapi/commands.py | 101 ++++++++++++++++++++++++++++++----- scripts/qapi/gen.py | 31 +++++++++-- scripts/qapi/main.py | 10 ++-- tests/meson.build | 11 +++- trace/meson.build | 11 ++-- 9 files changed, 180 insertions(+), 28 deletions(-)