From patchwork Fri Aug 30 12:19:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vandersonmr X-Patchwork-Id: 1155944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ItOKUmoi"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 46KhTD2cCkz9sND for ; Sat, 31 Aug 2019 00:20:15 +1000 (AEST) Received: from localhost ([::1]:60160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3hl4-0004ND-Ia for incoming@patchwork.ozlabs.org; Fri, 30 Aug 2019 10:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53177) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3hXH-0005i3-OT for qemu-devel@nongnu.org; Fri, 30 Aug 2019 10:05:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3hXG-0002HK-Cp for qemu-devel@nongnu.org; Fri, 30 Aug 2019 10:05:55 -0400 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]:43966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3hXG-00025Q-2j for qemu-devel@nongnu.org; Fri, 30 Aug 2019 10:05:54 -0400 Received: by mail-qk1-x743.google.com with SMTP id m2so6181839qkd.10 for ; Fri, 30 Aug 2019 07:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n5K+/jgCN5Vl1Y5P2Wq4YmrdggUNqrnMnKcI9mMTaeY=; b=ItOKUmoiWbO4UHbsSe53u+ojH3OQfZ/XVbmKASjPTGpyao9wFSkDVGdW2Rp/t3NTrr /8CqITuwIG7fpJ/ItpwpeOSbFfZS6vUVeSbav+CAUPwW3pk0UEdb1+1JORBo86uBuD0i jcMh48YdMoDmEF+VFJbfZWb+LR0f+P5dLvcM1awLi5aqi4W0QHKFU08sSlpkNpp/CfgV GzXh1dviLTv3awcCeYcwAZvZBmtDiZ97LIgpN1MTSLIAcY4byXjXK1wfW3yZQ8k0f2C/ NYxzHg//ju7um2vLkZ6Yp2Ct0OVvE+6IuqwNrcvlwPaYAFnj85O2FRjzmOFtxMicB5g5 Gmkg== 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:mime-version :content-transfer-encoding; bh=n5K+/jgCN5Vl1Y5P2Wq4YmrdggUNqrnMnKcI9mMTaeY=; b=EAsEmqnlP8gPkzZiMgR9gWI4JUmvRNujxWLl4xRvRei6HNb34G9+3qVI7UjyttOkP1 6BgTVsiXj3qEl2QpIflaKRyOiMrJvEUK115lHBh6lJ7RNaYP7NT+Lob5f9aVaNIRf1Mv iLUEPiBWxHIHTtFxTS7zRz4TImV9BdSoOcLR5aeC1irjhqxdu6QxhBBSBXMty8t3OWj/ jTrIhEu7n1em+os6RvqZ0khEkNfKSIiZX/08YlaI28otmqUNUFRubwBq3lNnWY7YyzQT lmtES1U/CgIkqLkbtAL3Qf6W3IVtjxyeoihfehpL141WTaQOGMjWnVOEz8F1bIQUK2dg XB0A== X-Gm-Message-State: APjAAAVrshF4QunnMszq3CFH3i3OVLUNSywZQzZNLhJO8dBbaCNHz1Mx xf3PLOFoUR+4/Ay2jWAGyrGezqHAtBt0Kw== X-Google-Smtp-Source: APXvYqznWkG/Jjkq3oxJrlj9tfzP9mgk/N2vDo2OF72PpeOAWCUVUN2svd7q9Qlp/tkG8id5gSnRrA== X-Received: by 2002:a05:620a:142e:: with SMTP id k14mr14669937qkj.336.1567167553472; Fri, 30 Aug 2019 05:19:13 -0700 (PDT) Received: from vanderson-lmcad.gw.lmcad.ic.unicamp.br (gw.lmcad.ic.unicamp.br. [143.106.73.166]) by smtp.googlemail.com with ESMTPSA id o127sm3001299qkd.104.2019.08.30.05.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 05:19:12 -0700 (PDT) From: vandersonmr To: qemu-devel@nongnu.org Date: Fri, 30 Aug 2019 09:19:01 -0300 Message-Id: <20190830121903.17585-1-vandersonmr2@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::743 Subject: [Qemu-devel] [PATCH v2 0/2] Integrating qemu to Linux Perf 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: vandersonmr Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch is part of Google Summer of Code (GSoC) 2019. More about the project can be found in: https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality This adds --perf command-line option to dump Linux Perf jitdump files. These files are used to enhant Perf report and to be able to analyze and dump JITed code with perf. Example of use: perf record -k 1 qemu-x86_64 -perf ./a.out perf inject -j -i perf.data -o perf.data.jitted perf report -i perf.data.jitted vandersonmr (2): accel/tcg: adding integration with linux perf tb-stats: adding TBStatistics info into perf dump accel/tcg/Makefile.objs | 1 + accel/tcg/perf/Makefile.objs | 1 + accel/tcg/perf/jitdump.c | 206 +++++++++++++++++++++++++++++++++++ accel/tcg/perf/jitdump.h | 36 ++++++ accel/tcg/translate-all.c | 14 +++ include/qemu-common.h | 3 + linux-user/main.c | 7 ++ os-posix.c | 3 + qemu-options.hx | 11 ++ 9 files changed, 282 insertions(+) create mode 100644 accel/tcg/perf/Makefile.objs create mode 100644 accel/tcg/perf/jitdump.c create mode 100644 accel/tcg/perf/jitdump.h