From patchwork Thu Nov 28 19:46:01 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: 180462 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp558796ile; Thu, 28 Nov 2019 12:04:01 -0800 (PST) X-Google-Smtp-Source: APXvYqx48sTvn9Bg4ejDQGHnw7r7OqR/P2+fZafWTGy7Lz+eAkGVWsnbXTI1w3kUMDqeLyvqtL++ X-Received: by 2002:a05:620a:796:: with SMTP id 22mr10624485qka.419.1574971441603; Thu, 28 Nov 2019 12:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574971441; cv=none; d=google.com; s=arc-20160816; b=st5L06k3V9YW1JwtMvs3zGGqfU5dKdFWbdAA6fYFhWPMnX/3xRo0Xy50yMbpqzeUgh SPXNYAxD+UoOdkwCkr5pNh/jlIn1Zie+A3zPRI4f7sOEn/0O/CeEPYY15mRE5el0moa4 5YWk9wpNM+utAjnjXwZOpMCdsKuq7athaKkPsufPb1o0dRURHd3El25dtOreZQB59hv1 jeJZPicNGJT19gPGOWXTLxcTCyFzXDZ1mXSQyE/8BX/H+pQa+IZJ94wa6IaTA/feKGey xSp9rnPneyoJ09PJwFPX/CUqD8TkAuiern/GG0nxdWFb475ChzEdI3Cm7wWSRpDPkYmW uzvA== 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=Xd6QfwNiUuZdPTT7wpujCjGiQ2e91NoQmlqER4ZPXuQ=; b=ID6ygZVN7dTR+OffCR5SGYm07bt2Y08RzqNiFWgQGK/W5732JYSk8AiKj39V1/S/QQ jzmypagXDblPllU9+nmtSud9a3ve6WlusfUF2D+TecnBR3RYsj+nYiH6k39zip4gUlrF 8KBbAKK/pA5L8J4VJVshr/yIg1TO6VoP0ORpE95jtrDTUcEo6vMoNdVUDTRsgCy5VzG+ 1/cK7IVuCzACHDSJ3rqswhnyENPLkoOtGC0BugE9eRPSJ7NWy5oVG2QabdX0EIqinKhk zcdO1dbCyxVzDaI2dHRkpXWXTGaDvhTRW2vtqZd9yZd/FSx+a2yRMFp3C0tSMaoAs6O6 sh+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JpSpTaCw; 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 t19si12795817qto.107.2019.11.28.12.04.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Nov 2019 12:04:01 -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=JpSpTaCw; 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]:52878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaQ18-0002gN-4f for patch@linaro.org; Thu, 28 Nov 2019 15:03:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49989) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaPpR-0005lQ-4e for qemu-devel@nongnu.org; Thu, 28 Nov 2019 14:52:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaPk4-0005Ja-Kq for qemu-devel@nongnu.org; Thu, 28 Nov 2019 14:46:23 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:52562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaPk0-00052o-3b for qemu-devel@nongnu.org; Thu, 28 Nov 2019 14:46:16 -0500 Received: by mail-wm1-x342.google.com with SMTP id l1so12033441wme.2 for ; Thu, 28 Nov 2019 11:46:11 -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=Xd6QfwNiUuZdPTT7wpujCjGiQ2e91NoQmlqER4ZPXuQ=; b=JpSpTaCwy7M3rrf1KrlwDUZKqph0ZZLFcsYpaw9TPn68evSYwfZZzQ+VHXdahJgONJ qqrfXpBZHmOk0y5u4lapig6U01UJrjCvTCyPhnlGjSxpKeLr5CG3jeXcUpO87K1XzLes sZa79T7/HBZbNb8WDrxjX0tPP16E9+ebyC4vjEqVCQDoKe30nrvHRlrcc8anUnsm1Twl czBmIqZBJNsbMATdEZ/qghMXLMakyYiGhGvRYM/lRzSdDKf2xa5cN3dfTtlhvnpe0AYZ 8ID9VOAlMNSqUy1tBM9SuiC7o0cqGBiCwyZSL3d3+Da+w4yj4euNnEubvZ5xNaUQVZdC USAg== 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=Xd6QfwNiUuZdPTT7wpujCjGiQ2e91NoQmlqER4ZPXuQ=; b=IG6X4YrE+k6alAm5CbsyaUszZtmc5NYYv9G8608sMiPlqJ2DURlovHf6/3R4Iz9wVm WX9Olsn2J+k+rQWGC6ECoucSeUAM/DMeRXQWtOmcBUcYkwxHfTgv0BR+i87tJ/j+tl4F AxBEYtJTVvOkyhhslkfeHw4tPB6amv5kmtvA/aPeLbJ3DNcvuBfTkpxAiOHST5C1h4l1 jhEvlcWOOqYMswAbuS6sol/qI/6ohSRDfRLTwQwLOpb3r63vK0K0dVbh+9EDFH6kZuvK cz7HlU5OcD6+ngW0u0c7NX3Opb5wqqN2zyet/uCZEMgXk0RiI61HUUJ+ZxLWSqkYsXon DCnA== X-Gm-Message-State: APjAAAVMCAobEc1ZM/UqblXKfkadIZU471xuTZaI+ngkm9EGqNnuDCXF gzNIPh1Q6h8tO4y8q8XkuAbp1w== X-Received: by 2002:a1c:9cce:: with SMTP id f197mr6418427wme.133.1574970369864; Thu, 28 Nov 2019 11:46:09 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v188sm801710wma.10.2019.11.28.11.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 11:46:06 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B86CB1FF90; Thu, 28 Nov 2019 19:46:03 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/5] linux-user: add target_mmap_complete tracepoint Date: Thu, 28 Nov 2019 19:46:01 +0000 Message-Id: <20191128194603.24818-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191128194603.24818-1-alex.bennee@linaro.org> References: <20191128194603.24818-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::342 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: 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 --- linux-user/mmap.c | 2 +- linux-user/trace-events | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c81fd85fbd2..a2c7037f1b6 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -577,8 +577,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 9411ab357c9..774280cefbd 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, char *flags) "start=0x%"PRIx64 " len=0x%"PRIx64 " prot=%s" target_mmap(uint64_t start, uint64_t len, char *pflags, char *mflags, int fd, uint64_t offset) "start=0x%"PRIx64 " len=0x%"PRIx64 " prot=%s flags=%s fd=%d offset=0x%"PRIx64 +target_mmap_complete(uint64_t retaddr) "retaddr=0x%"PRIx64