Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5936280ybn; Sun, 29 Sep 2019 08:48:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ4xpd1fX/X3AJty0yseofWsCyaO2j7w23oCkkMZ8mxKfO6Sb1AAUwb2mwr3WVrR/bQJRV X-Received: by 2002:a17:906:f6d1:: with SMTP id jo17mr16007253ejb.62.1569772129919; Sun, 29 Sep 2019 08:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569772129; cv=none; d=google.com; s=arc-20160816; b=AMlrrVXSNK1Hr6CBktdsquQemR4qlBYNrRZzdwP/TWhqBdquF2ws1na0uHKM6B0HWB 1Z+9I1xP9NfVtjo8EqndxAUZCu8RZY3PJIZemjjds/e0l/KRc/e6d9qGgh23TJX2LEHQ pZNaaYbL75w8keo7KYAsJyDHrzFbnGznLSGR5+j9Qq/neZflle7o3k/cxWsNEZGcwWG5 t8pyS7TwDXFF1zrzOF/peGcPIiviLgtBlfSc9j4cDnVMt/cPog76XG+ahCCg9KhrAk/y 1PQkOpLaBKwCB2FYQh2lWDe0OODlEIigZsu9v6pO9EWOIlQVDLH/9rVk36pQ1sYTjc8h ogwA== 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:from:date; bh=y3j58qd/J8OqchCKou8qekkXjxZ7ARWUHtcuEDYr8GE=; b=k1xqHMt7Kq/ATPygUvrVBtfpWReBqsOjg8/aFbmq8pxWidfbwiqNCC5G0zXrJMMcou mvg9XseuKRFrQDxTScEYCMCiWQA2Ah64vT9bKSmCeeJ0SfZ6JHrJzH5C5DA8tdCd+vcK GxJsa0nOJDvCQC0VCiOoU6vR/vVlT32hJ2/1HrFF5/9A42cR9jToiEs/nNxodOSLfdJW FCg2+qyOA/PTGvLUtxkX9FnrPki3vY4G5UxRtvy/tde2BzUZlxeycPsml1tZo/UsTqQx J1AUrO8K4x1r3Sv4pH3EvUOxW5XKtpEZT6jLF5E4HSa/pStSGDVBzKmRQQQJeUEeUSDY Y+Bg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si4963179edy.145.2019.09.29.08.48.25; Sun, 29 Sep 2019 08:48:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729003AbfI2PpO (ORCPT + 99 others); Sun, 29 Sep 2019 11:45:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40802 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfI2PpN (ORCPT ); Sun, 29 Sep 2019 11:45:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA43A8980F0; Sun, 29 Sep 2019 15:45:12 +0000 (UTC) Received: from krava (ovpn-204-45.brq.redhat.com [10.40.204.45]) by smtp.corp.redhat.com (Postfix) with SMTP id 6CE4C60606; Sun, 29 Sep 2019 15:45:02 +0000 (UTC) Date: Sun, 29 Sep 2019 17:45:01 +0200 From: Jiri Olsa To: Steve MacLean Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , 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: <20190929154501.GB602@krava> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Sun, 29 Sep 2019 15:45:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 28, 2019 at 01:41:18AM +0000, Steve MacLean wrote: > 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. > > 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 Acked-by: Jiri Olsa thanks, jirka > --- > 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