From patchwork Thu Dec 19 10:49:30 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: 182089 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp316758iln; Thu, 19 Dec 2019 02:58:58 -0800 (PST) X-Google-Smtp-Source: APXvYqzqmvQUAtCe0RxtVPLOym2GGeQg6duDngvjFbAbOPQtsbieqGihiaU5xuVcL0g/pnu1FweX X-Received: by 2002:aed:3e12:: with SMTP id l18mr6128764qtf.91.1576753138382; Thu, 19 Dec 2019 02:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576753138; cv=none; d=google.com; s=arc-20160816; b=l7wEfVDdQeT9Kqxqde4Fi5R4JxuD24QJAglXXl6DzdLvmZrNdn5eE3YFc7NSTwULcw NhWbc0hmUpydSC/jDHGwhWMYUFyCFl2YU8wvH0NiA7QB9yeJWIXoGsRlhRU+ExHI0ec5 hvTY920cRAcAAMnwhOO5ysh2aCrO2JePuNzPkk4NzChwR8LhENhLbyKg9V1nKczYJPf3 ETFdq6vX1LS5Ot6bzg7AmWwn6qpXAZvkkilCcpkXACaBOTUW/8UTTfvZITRIpVtKLWV4 0gjkeZrMpIgStDjRaDlD/J/OIk1I8RplBSP5VtyGSNlWMPpcoRHqasd9IiET8MZVkY9K PxLA== 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=H8z1MrJa+EblW1lPryKy7epJgduWdqrAx6IGD9b/tew=; b=GK7kFnGvGxGDpF/hqXMMK4aQO248xdHo7dIILFphKYZ6sxSwBG5lvOS6CGuvJnW213 bmcxAt0ULyuuwqCkXpW6FyhrSpbehKypt5dXsckd+u4TMeTt4qbjjdtU3uiBCEzBTICc 1zw0y76XsTVMpotUnLFnBtivzWRzK5BpqLJOuCi0F5IgkfC1YNP15zOnJ8HSvqVc3xhm /ETa6ximOE1w0jSv43eJvqXGBFArWSXc5R3Eq5G0NK2RYPJn88Zty5DHGlzb//jDTmcs /+sJ8AOjOZnekWUdxrBNaxjptJyHYt7ehTfMrixGGakgzDp6Er6JOFAkSqhB/M9LqXyR ZiAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M8EA8SP2; 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 l18si3646220qkg.276.2019.12.19.02.58.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Dec 2019 02:58:58 -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=M8EA8SP2; 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]:38904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihtWD-0002se-Va for patch@linaro.org; Thu, 19 Dec 2019 05:58:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41122) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihtNX-00070b-I5 for qemu-devel@nongnu.org; Thu, 19 Dec 2019 05:50:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihtNW-0001F7-Bi for qemu-devel@nongnu.org; Thu, 19 Dec 2019 05:49:59 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:51621) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihtNW-0001Ah-0b for qemu-devel@nongnu.org; Thu, 19 Dec 2019 05:49:58 -0500 Received: by mail-wm1-x32d.google.com with SMTP id d73so4946926wmd.1 for ; Thu, 19 Dec 2019 02:49:57 -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=H8z1MrJa+EblW1lPryKy7epJgduWdqrAx6IGD9b/tew=; b=M8EA8SP2f64jGJ37MO6QOsBQwhO9mff4UYO8O/sNtFKyGReTH+57VN2c1fflGL9C9Z KogucPBhkiu9rQycCsSNoxFyO/2d1k+dHcWqxXWLvXU+X+wPiM3qr1HpWVXwKUbqQNV0 1p02DRS4c2+vvkCApkVpFbQndalxR75ww89Ttb57DFO/KKKnYBbFfHIhsQRNCJI2o7g8 JV+ifsQaRWc6tyFK3y6uH2m3nlWwu5C63TNmriU10Vn0TtZGdljwJXgWnoIEcCR7lAJ8 SUQTfXaPDHjcK8E9DDj8qH/+sDn/mA6ggEnf7M5PAqy3rHBvLgUatiZ+2q4t59m2qm5w PbRQ== 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=H8z1MrJa+EblW1lPryKy7epJgduWdqrAx6IGD9b/tew=; b=RQkwhlSJ3ZYueoBLaa5pOMvilp11MVTdnCdy09//I/l/w5igXIHqhvHNdoTz1ZJENu 2ut63VPWUqbmttAb4SOHhuLmq8jO7aXm1i6xSNg4OQlXwlH2IG133Sz0TIbyg3nbC85r Z83Ludc3Oy+kQcG3h0cqAJV+7YsFQkzwwWuRDcF2mEVuF3qMtctUKrMvTvH+KEXFbU0s 3AtxN/IgA9ctwVwJzw9o8HBsvuF6zFfvf9Ywh469WZFnT5fRjj3H3PLVZPuo3fis4DTO lRf7DE5bgjFmhi+rgdbgEy6UAdxF6r6IEvgIakkvjRotkzueDxO8JrDobxkzioDexCxO 3JuQ== X-Gm-Message-State: APjAAAV/PtSkmgp5JD4l2//4/lpWsxFOomzm+9JI7VRYho94YWTkdN4h BkZXuCqfJ01dlvhtFUG7I/yx2rNuBo0= X-Received: by 2002:a7b:cd0a:: with SMTP id f10mr9648646wmj.56.1576752597021; Thu, 19 Dec 2019 02:49:57 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s15sm6340132wrp.4.2019.12.19.02.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 02:49:51 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 72DB31FFAB; Thu, 19 Dec 2019 10:49:36 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/25] linux-user: add target_mmap_complete tracepoint Date: Thu, 19 Dec 2019 10:49:30 +0000 Message-Id: <20191219104934.866-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219104934.866-1-alex.bennee@linaro.org> References: <20191219104934.866-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::32d 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?= , qemu-devel@nongnu.org, 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 Reviewed-by: Laurent Vivier Message-Id: <20191205122518.10010-4-alex.bennee@linaro.org> -- 2.20.1 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