Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6785618ybn; Mon, 30 Sep 2019 03:50:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlkXp5Tj0HyxFLmbhYB9gKONF86zEf1FtzGUx7i4tTMusKpcyP7O0Rx0Lqcm7UaUGsASTL X-Received: by 2002:a50:9e0a:: with SMTP id z10mr18968556ede.202.1569840625318; Mon, 30 Sep 2019 03:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569840625; cv=none; d=google.com; s=arc-20160816; b=MZg0qNRge/HG3Z2uwB+SgTwkQdf6GCM1Vg/mqslko6B4KuFIintqk23nyJanxb9t91 n+0ar4jcZ+TngfBvbkbzi0DpOFCimD0SIpdjjrEI4MwJ4xuKqFqDx20uYyhurbf1ALX3 IcPO2xDYC4pRPSSS5KTAFfTvDcbXUcKb/ZfT9oUqEf4mI9UvIfyFtwt0q2OQ0zPeRSMZ z7n1HkBoclcARQ1QDYyl2pZfZ5hXi7beVj/dGe98TEaAjhNoyZyhyqxYuGL2koLfNtei KpqgAn8FdNEkZgcOU4iPHu5rLygmrEivX3GkpNCnCH53FyBR3odmvu7hCf6p8HBYJ6n7 qsBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=yKSYeCUs2EWw/xdzgOFe3PhKw3PZZwmvMA9eANeKNY0=; b=EQLArxyS+NYT40YhJyMZnHpWyMfIa6NQm+dw33P7yGWwBEwpPqGPdolq1Sz3RCgDIn iuyu/xN80RQOOe2U3KGAIWHxLRsFK6Ivv/ku2xHAQ4p9EyOalpkg6nQwn4dr531RpIzX EVK4mNWkq8xsMjW+OqCeXXXMY0ox0bvV+GLP4nOjBeNTNw3K1qbLLw0W6hKWOAPGGnwG f6AcCb4RZQ8EFEC1ULKhfuD7olJKdWCSlAJ0UkE6yODD6KSMp1JfzSm1gKu9uahcPxCD MsMQmH70xKAeP+hqhS5H4+cru7uRlNzh7djpN3oesE0relUEo7JRuw59WBooKpca+EVS LXhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jB5uJfAO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y54si7486384edb.217.2019.09.30.03.50.00; Mon, 30 Sep 2019 03:50:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jB5uJfAO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730702AbfI3Krc (ORCPT + 99 others); Mon, 30 Sep 2019 06:47:32 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:33687 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729415AbfI3Krc (ORCPT ); Mon, 30 Sep 2019 06:47:32 -0400 Received: by mail-qt1-f196.google.com with SMTP id r5so16409332qtd.0 for ; Mon, 30 Sep 2019 03:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yKSYeCUs2EWw/xdzgOFe3PhKw3PZZwmvMA9eANeKNY0=; b=jB5uJfAOU1tQSgqIl5pxjyV61xW1Inp4OMCMsYTh9ESmSAUkvv1U9qegIhPwA203/X PjhCpQTPU4S6uXwFaoufWnXjcElkcrmkU8oGZdDxS7zmoiNNKDuJHD00UjP0etTLIiSd alx4qTqMw2mL/wKEBGwR4peSwZTozzY51DtmSz9XoNX63ukyZkaCAXwGUN4yxcUWqYT/ hWpP1gFJ4rlbK1sEs5w+gVS6x10yREsH9qgfYamnG6kXD1Vyjvyoj9bzAiiVngSQ207n HGRoTFUrZtFv3yVgF8tSRKNP6HsR4SH+IaqMlDaMmQOzzLyOFZ96RTKvx0Ev9Z/fpYLi W0YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yKSYeCUs2EWw/xdzgOFe3PhKw3PZZwmvMA9eANeKNY0=; b=CaI0FrsOFD1YGYCVDONiT7ikP7iSNd9/vb9V5cljrTm9mNpZIfQzIP1GWFs/Zv73Y2 lom85IY2T1vnADPPtPNDOAWCd29fsKy8nn1oep0FL0aFaGZlqPgjHpbluNhAVEOLSORH aiN1whBAk07QQxTBwTY2GNDSHCG74mDicK7o6pO0qQolbYi13CQQl7VhkPEYskOq+jxi /Oozr55zr/xD0sVilyNKIXw/llTVVV+FzSRcShJbbS6kNtIwAdncu5gXzGKb/sLzZjE4 puq5NX9iBHcvKW9M0UVHH7crGLeFiSp7h44VCvOlYvIUwD4nxXPWl+DI7WBzCyhKa5QT 80lg== X-Gm-Message-State: APjAAAUZuq98yII/yPy4r9qmucjeYxHfDm29qTXtLy+2fTuH84Ev2o76 5gEOEbsEDf9/KiuIi7hoCyM= X-Received: by 2002:ac8:2d08:: with SMTP id n8mr24950778qta.374.1569840451367; Mon, 30 Sep 2019 03:47:31 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.35.50]) by smtp.gmail.com with ESMTPSA id e11sm4961382qkg.134.2019.09.30.03.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 03:47:30 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 1E0DD40396; Mon, 30 Sep 2019 07:47:28 -0300 (-03) Date: Mon, 30 Sep 2019 07:47:28 -0300 To: Steve MacLean Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Eric Saint-Etienne , John Keeping , Andi Kleen , Song Liu , Davidlohr Bueso , Leo Yan , "linux-kernel@vger.kernel.org" , Brian Robbins , Tom McDonald , John Salem , Stephane Eranian Subject: Re: [PATCH 2/4] perf inject jit: Fix JIT_CODE_MOVE filename Message-ID: <20190930104728.GB9622@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, Sep 28, 2019 at 01:41:18AM +0000, Steve MacLean escreveu: > During perf inject --jit, JIT_CODE_MOVE records were injecting MMAP records > with an incorrect filename. Specifically it was missing the ".so" suffix. > > Further the JIT_CODE_LOAD record were silently truncating the > jr->load.code_index field to 32 bits before generating the filename. > > Make both records emit the same filename based on the full 64 bit > code_index field. Thanks, applied and added: [acme@quaco perf]$ git tag --contains 9b07e27f88b9 | grep ^v[[:digit:]] | sort --version-sort | head -5 v4.6 v4.6-rc1 v4.6-rc2 v4.6-rc3 v4.6-rc4 [acme@quaco perf]$ Cc: stable@vger.kernel.org # v4.6+ Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") So that the stable folks get this backported. - Arnaldo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Stephane Eranian > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Steve MacLean > --- > tools/perf/util/jitdump.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c > index 1bdf4c6..e3ccb0c 100644 > --- a/tools/perf/util/jitdump.c > +++ b/tools/perf/util/jitdump.c > @@ -395,7 +395,7 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr) > size_t size; > u16 idr_size; > const char *sym; > - uint32_t count; > + uint64_t count; > int ret, csize, usize; > pid_t pid, tid; > struct { > @@ -418,7 +418,7 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr) > return -1; > > filename = event->mmap2.filename; > - size = snprintf(filename, PATH_MAX, "%s/jitted-%d-%u.so", > + size = snprintf(filename, PATH_MAX, "%s/jitted-%d-%" PRIu64 ".so", > jd->dir, > pid, > count); > @@ -529,7 +529,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr) > return -1; > > filename = event->mmap2.filename; > - size = snprintf(filename, PATH_MAX, "%s/jitted-%d-%"PRIu64, > + size = snprintf(filename, PATH_MAX, "%s/jitted-%d-%" PRIu64 ".so", > jd->dir, > pid, > jr->move.code_index); > -- > 2.7.4 -- - Arnaldo