From patchwork Thu Dec 5 12:25:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 180890 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2036533ile; Thu, 5 Dec 2019 06:22:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxqUKwjtef2K0b+V+otbLA+OKLDE9T86ij5MSUk/cjP7aHUUlJij4NawH5QCE7eCt+yY+js X-Received: by 2002:a05:6830:12cc:: with SMTP id a12mr6120255otq.73.1575555767190; Thu, 05 Dec 2019 06:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575555767; cv=none; d=google.com; s=arc-20160816; b=A8L0ppZjrcMBV2TpCCDdcB9w/yG+ux3R4LujpCAoFMrD2eYI1iHw3XTQHBK2HALuoW SvZt3nrYqGyOmaKjKVD4hVrOCiM7eRE84NmNM/w7cRzc7lWyfH552Pfde1FPRd1qw1LH cu8+BLtG/mZwstMD/vOMr8oba+RWlq3m8TC33GPa1MU5GtBguK72Mm/DofCpVIaIz1nV ZcjwSp0IaJbTSSUzByoH2oS4z7quckKi5nHQ4d9gqEo1Q2ODMay0lyoHF2LAwO09CKwn NFz7yixKxZX32wkZm+7rG/rdshXLsxcuVBCbDOEM+MZfDP7yGVjiJjHcPUCbLug87UO3 R6KA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=j8BHLefjvES9SOUgRcfX4ySy651Dqcu3C9AOxEtMINE=; b=fMygrlG0MV+Jy/qzqYzqwrpELT1j5j0DkWnnc/fwe+4fKaIrKvWNRJJCQEerZlTWCq Dw+QbTbPTQDyfoinIAvUlgDKd4Xi6g8yZ2NNG1AABS91i+QHrwlfwfn9RMUh/23vecZN Pibp0G34nhYuegpj0tEe03BAmgmR/ShAgklUe4XIrGU9sgC9ME7LcUmk5wRqKuiX5hd9 O5ZivdeJ7jtWSx/VlYzKsHe77xZRJSvJR5CiNbPW92HNE1sdyepf3SMtMWZ1n0Ys9vKZ Dh92OTSkjjLN73eNTd8cPisC1fVSYxrWz54AIyHRaIAWOtxjS6LucXOSza+VS8CXxOqu hqDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=H9d2840q; 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 5si2465356ott.186.2019.12.05.06.22.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Dec 2019 06:22:47 -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=H9d2840q; 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]:55154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ics1m-0007Lw-9z for patch@linaro.org; Thu, 05 Dec 2019 09:22:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icrwD-0002c0-Qs for qemu-devel@nongnu.org; Thu, 05 Dec 2019 09:17:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icrwC-0003tT-CI for qemu-devel@nongnu.org; Thu, 05 Dec 2019 09:17:01 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34183) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icrwC-0003oN-26 for qemu-devel@nongnu.org; Thu, 05 Dec 2019 09:17:00 -0500 Received: by mail-wr1-x441.google.com with SMTP id t2so3847049wrr.1 for ; Thu, 05 Dec 2019 06:16:59 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=j8BHLefjvES9SOUgRcfX4ySy651Dqcu3C9AOxEtMINE=; b=H9d2840qQHkWnEUhW/yRLuN9XbkJ2AtviP8lUc4S+3SvC/u3qn30KkX2ynW/dZwws6 zkN3DLP2z983CcHPnDhwOXKwaQPjRbrb8BZ0L2Cezw2jGMmWpcKM2zXwhQEhlz1R3cII ROP0sz9Bf5oa8LMBWqXRrcTv4faM/KDoITZ3ntc5gh1gTrv99MHqd9g9rcfwDjIA4Avi 496oyNAP8pZrxwjmMeooiCOX6usOZSK2uueloRDSm6appx2Qgz8nvOFZr6hhlMZSxExj nlMhC0NlKxfcyzLS1KpPcKIfdbNKs7OmIdAM1aBiUP1fixn8ZM2N5hiHAWki6e9euXrT leBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j8BHLefjvES9SOUgRcfX4ySy651Dqcu3C9AOxEtMINE=; b=mDnz0TlgDjouTJP6vUuJ/XNPlCzJ8FVcgBT7IianKrEWI6NRybi3XV7H0gUWkXseap 4miYtbWrbrxIm1sYGwOUzMwjHQXW2UQMoFNOnWsUuwUMGH3dE03xt3s7XQCiva0U9w4O OdBPoQTUt0n7Xdl+BeOlJCaIpgGx+YH3jgeIBpDnYguIjEn435BQ8f00JFZll9Zl6Qfd ted3Ce042xfxB5dFUbTC6MJjprqZ2e506LRAVRR6CLFkTbr+2TSqI44T0UneV93Kimk5 VKKaj3i7Un2NNftCuzZSXpOrCvTbIYC7cjuC4XuPRDKmtoVR6gu+TaURRwz3MVld23Bb uulA== X-Gm-Message-State: APjAAAURnyZ3ktPIOMqQrlatwKw3jGddm4NuqjCOMQIeF9Qv/T/3294x v8xZLRhEXfXvnZ+XTaPQacBzPnaQvDw= X-Received: by 2002:adf:fa50:: with SMTP id y16mr9908354wrr.183.1575548723861; Thu, 05 Dec 2019 04:25:23 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a64sm11379882wmc.18.2019.12.05.04.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 04:25:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5225C1FF90; Thu, 5 Dec 2019 12:25:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 3/6] linux-user: add target_mmap_complete tracepoint Date: Thu, 5 Dec 2019 12:25:14 +0000 Message-Id: <20191205122518.10010-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191205122518.10010-1-alex.bennee@linaro.org> References: <20191205122518.10010-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: Richard Henderson , Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For full details we also want to see where the mmaps end up. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- linux-user/mmap.c | 2 +- linux-user/trace-events | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Laurent Vivier diff --git a/linux-user/mmap.c b/linux-user/mmap.c index f4f10deaeac..0b1b43ac3c0 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -538,8 +538,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, the_end1: page_set_flags(start, start + len, prot | PAGE_VALID); the_end: + trace_target_mmap_complete(start); #ifdef DEBUG_MMAP - printf("ret=0x" TARGET_ABI_FMT_lx "\n", start); page_dump(stdout); printf("\n"); #endif diff --git a/linux-user/trace-events b/linux-user/trace-events index 8d8d4c3c68c..6d6aeef7b52 100644 --- a/linux-user/trace-events +++ b/linux-user/trace-events @@ -15,3 +15,4 @@ user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_add # mmap.c target_mprotect(uint64_t start, uint64_t len, int flags) "start=0x%"PRIx64 " len=0x%"PRIx64 " prot=0x%x" target_mmap(uint64_t start, uint64_t len, int pflags, int mflags, int fd, uint64_t offset) "start=0x%"PRIx64 " len=0x%"PRIx64 " prot=0x%x flags=0x%x fd=%d offset=0x%"PRIx64 +target_mmap_complete(uint64_t retaddr) "retaddr=0x%"PRIx64