From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB4C2C4360C for ; Tue, 8 Oct 2019 19:09:21 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AEB96206B6 for ; Tue, 8 Oct 2019 19:09:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zQ1dvvwn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEB96206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHurI-0001j6-T5 for qemu-devel@archiver.kernel.org; Tue, 08 Oct 2019 15:09:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43377) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHuo1-0007jH-GF for qemu-devel@nongnu.org; Tue, 08 Oct 2019 15:05:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHunz-0002UV-VS for qemu-devel@nongnu.org; Tue, 08 Oct 2019 15:05:56 -0400 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]:39225) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHunz-0002U5-Pf for qemu-devel@nongnu.org; Tue, 08 Oct 2019 15:05:55 -0400 Received: by mail-yw1-xc43.google.com with SMTP id n11so6833058ywn.6 for ; Tue, 08 Oct 2019 12:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=33u781c2wjZIZSK1xJx8AVX8hAoJ4VkdzvclLzke/4g=; b=zQ1dvvwnUNh9QFP1+f9dNETe7LxpilP4vKxlmPZPpNfefILv/Ma+AlAYVRawDWB7T4 O4X4XOFfA4nqIDMpd6jL9+KpbYeUzWHKPlipiAYMi7iKcS/1OpqkRw1h9zLs73IsfnYU wpS2j2KGteluqBO1rDM5EFtwikvTBJjKXY6QnZxYMDFjT/b+zYKHO+Gx+1pZ8Kmiu+k+ pvoHUrrhgNRtU7fh+eMoYW+1HwMWXLHvMRVeZoFXqjiKmNsEtKe3zPx8I1g0UCX0g6AY vE4syriflxOAbxrAxW+UiGw9As4oyIBY91kY6fF6n1TjEWOTi3fWAffaTmhGnJZgxh6M RJow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=33u781c2wjZIZSK1xJx8AVX8hAoJ4VkdzvclLzke/4g=; b=Xv5yh42bwFY8sCf+U9a/CiCM6AiCaOiRUhBtcgpLBWYXEcm2nMm1VirHxZEKq3MnJo ycatAyedsbf0sDGqchlsRoSyWbmTJvTeQWn6JFL4WZZmwf+DC73WnUwExmsiPB5lJlQz S7eB0URfRA7U1XQWAdf3NmuSS6mWyCpghyCuMiuZoDE2HtZQpTFdtBOHWrEYf7H25hgL 8VbxUVkRVPeBrESIsGZ6p2hOoXODk3vBTcLuPFFmEBDEvVeyt8Gl8WBxiYczVNyE+O2d AyfYoEQ7J6J+nad9AyCoAt9877rmUmPXEVANoLrMj0ubDZ82YJr9Hvtiy+2OplLSQ5ng hY3g== X-Gm-Message-State: APjAAAW0DVEvaqxpzpb9P7Vt9lYOLe5vW5TU8xqqLIVIABgAFMaRO/jB HHsI91DF1UXQvZHwlRH0WpmOuw== X-Google-Smtp-Source: APXvYqwgOUgxGmkqC1umkmTUvIz/1MKPqFEd+X/iaM2UsWb3AvqOUfTHo3jVr9FD8d2NEYI8aQwitg== X-Received: by 2002:a81:1c2:: with SMTP id 185mr26010948ywb.473.1570561554576; Tue, 08 Oct 2019 12:05:54 -0700 (PDT) Received: from [192.168.1.44] (67.216.144.16.pool.hargray.net. [67.216.144.16]) by smtp.gmail.com with ESMTPSA id w8sm4608531ywc.20.2019.10.08.12.05.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Oct 2019 12:05:53 -0700 (PDT) Subject: Re: [PATCH v9 10/13] tb-stats: dump hot TBs at the end of the execution To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org References: <20191007152839.30804-1-alex.bennee@linaro.org> <20191007152839.30804-11-alex.bennee@linaro.org> From: Richard Henderson Openpgp: preference=signencrypt Message-ID: <2346035d-42d5-2dde-95d7-32fcb2260b89@linaro.org> Date: Tue, 8 Oct 2019 15:05:51 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191007152839.30804-11-alex.bennee@linaro.org> 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 recognized. X-Received-From: 2607:f8b0:4864:20::c43 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Vanderson M. do Rosario" , Riku Voipio , Laurent Vivier , cota@braap.org, Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 10/7/19 11:28 AM, Alex Bennée wrote: > @@ -337,7 +336,8 @@ int qemu_str_to_log_mask(const char *str) > enable_collect_tb_stats(); > } else if (tb_stats_collection_enabled() && > g_str_has_prefix(*tmp, "dump_limit=")) { > - max_num_hot_tbs_to_dump = atoi((*tmp) + 11); > + int hot_tbs = atoi((*tmp) + 11); > + set_tbstats_max_tbs(hot_tbs); I think qemu_strtoi() is preferred over atoi(). My guess it that it's better to export a variable than a set_tbstats_max_tbs() function. I don't see any reason why stubs.c can't define variables -- they're probably no larger than empty functions in many cases. r~