Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1877098ybz; Thu, 30 Apr 2020 07:05:30 -0700 (PDT) X-Google-Smtp-Source: APiQypJFibL2ovEbdyYKY3KoEy7b84p6AeJctAnvGzP3IJt+eDAkhPmiuedmqQqJJ+ZDMZ9UdJdP X-Received: by 2002:a17:906:1186:: with SMTP id n6mr2710397eja.45.1588255530581; Thu, 30 Apr 2020 07:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588255530; cv=none; d=google.com; s=arc-20160816; b=OE8iK0vjOXJeXAK+nSjqiqxg99EbxrsJQIrpo3W/ijlPbDZQx7NcJ0hIhjj/mt0o9q 29EjeIN0FKxE4ipgLHbd52im5+Ox2arye+vS9d2KZsPfW5vMBUqF0VT7wm3vqUy0FDWS iLxMvqDfct2/lUfJxIYCXI6L6YoN52H706s+L5+8dBGs62P/37ACKrNz9Iol2uVW4BTu KN0/UjqoFjWnNTPBRh5cEYufC7fNN2sugWMWOCjcBBWj53K7fBge2v1P2xy8DHD+W4AP nLGEPazL1TPgD0wmxKW3qeBI5TFQotBjoodFF8UFOYzPw+lGB8MU1/QVLL1vCiKopp3e jJBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/2Q15GPhQzGKL/8ZP2UmZiqDYds09rGx/AYom2Pwqm0=; b=o/DZ53ttd9AFODe3Cw69eKV7tbwz+ajoEj23dwc+3KzyhhreUQNfpoHS0Bn1l10c0s aZrKBzg2gujfG7NsJrI2GYLI6F+7CgqBPKyBopzfTW3fsjpba6oZs1NbelAwdCnhVFAc UeOFdNIb8hCJE1/kJCcCtanMsE67Vg/ajU62GNb3fXM3/yYf8NTkD+nL/yMZYWyBqqLR /udq4uOGa96rSXXpsytfroGGurK0kxSzEwSpfVZAzhqQpLpDuE8tRpRbkFcrcywXVGcr g2RO7u5zwBr7Ek+kdtgRs9cZwf/567wjkUoeoiQjLl+h1bsU3lTrWcG2msZn1Qse+s4s 5BHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0AUGCAvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si5132005eds.63.2020.04.30.07.04.46; Thu, 30 Apr 2020 07:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0AUGCAvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728776AbgD3Nxm (ORCPT + 99 others); Thu, 30 Apr 2020 09:53:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgD3NxF (ORCPT ); Thu, 30 Apr 2020 09:53:05 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2F9F2495A; Thu, 30 Apr 2020 13:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588254785; bh=f3rOv7jXSBRKwhcH/xi8Az3LAJfn4iVHQU1B6aVHB9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0AUGCAvvLE3XIpD9mPyws8R4W3bS6o1xJel2HS3iFs3gXGOj3u7gEn+x8JpfvVjhX zyFCqmID1TcyKe3rtxKJANFDu2H8wpyVVUocXy5gCYUp0mYkjwnW9prDZCLQPegv1R FoVfb2O+hnRMWw2zDNbDGky9+EL/8HHZeks/gIFM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Waiman Long , Steven Rostedt , Tejun Heo , Jens Axboe , Sasha Levin , linux-block@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 41/57] blk-iocost: Fix error on iocost_ioc_vrate_adj Date: Thu, 30 Apr 2020 09:52:02 -0400 Message-Id: <20200430135218.20372-41-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430135218.20372-1-sashal@kernel.org> References: <20200430135218.20372-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Waiman Long [ Upstream commit d6c8e949a35d6906d6c03a50e9a9cdf4e494528a ] Systemtap 4.2 is unable to correctly interpret the "u32 (*missed_ppm)[2]" argument of the iocost_ioc_vrate_adj trace entry defined in include/trace/events/iocost.h leading to the following error: /tmp/stapAcz0G0/stap_c89c58b83cea1724e26395efa9ed4939_6321_aux_6.c:78:8: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token , u32[]* __tracepoint_arg_missed_ppm That argument type is indeed rather complex and hard to read. Looking at block/blk-iocost.c. It is just a 2-entry u32 array. By simplifying the argument to a simple "u32 *missed_ppm" and adjusting the trace entry accordingly, the compilation error was gone. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Acked-by: Steven Rostedt (VMware) Acked-by: Tejun Heo Signed-off-by: Waiman Long Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-iocost.c | 4 ++-- include/trace/events/iocost.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 9a599cc28c290..2dc5dc54e257f 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1594,7 +1594,7 @@ skip_surplus_transfers: vrate_min, vrate_max); } - trace_iocost_ioc_vrate_adj(ioc, vrate, &missed_ppm, rq_wait_pct, + trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct, nr_lagging, nr_shortages, nr_surpluses); @@ -1603,7 +1603,7 @@ skip_surplus_transfers: ioc->period_us * vrate * INUSE_MARGIN_PCT, 100); } else if (ioc->busy_level != prev_busy_level || nr_lagging) { trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate), - &missed_ppm, rq_wait_pct, nr_lagging, + missed_ppm, rq_wait_pct, nr_lagging, nr_shortages, nr_surpluses); } diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h index 7ecaa65b7106e..c2f580fd371b1 100644 --- a/include/trace/events/iocost.h +++ b/include/trace/events/iocost.h @@ -130,7 +130,7 @@ DEFINE_EVENT(iocg_inuse_update, iocost_inuse_reset, TRACE_EVENT(iocost_ioc_vrate_adj, - TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 (*missed_ppm)[2], + TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm, u32 rq_wait_pct, int nr_lagging, int nr_shortages, int nr_surpluses), @@ -155,8 +155,8 @@ TRACE_EVENT(iocost_ioc_vrate_adj, __entry->old_vrate = atomic64_read(&ioc->vtime_rate);; __entry->new_vrate = new_vrate; __entry->busy_level = ioc->busy_level; - __entry->read_missed_ppm = (*missed_ppm)[READ]; - __entry->write_missed_ppm = (*missed_ppm)[WRITE]; + __entry->read_missed_ppm = missed_ppm[READ]; + __entry->write_missed_ppm = missed_ppm[WRITE]; __entry->rq_wait_pct = rq_wait_pct; __entry->nr_lagging = nr_lagging; __entry->nr_shortages = nr_shortages; -- 2.20.1