Received: by 10.192.165.156 with SMTP id m28csp895628imm; Fri, 13 Apr 2018 09:37:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ACnshfeOaN2FIGdUzHTGusqxl1+p7IMWmBM4AAHW4bRvhPRiNbSiLPGhsLA2lHN4hW9db X-Received: by 10.101.98.90 with SMTP id q26mr4727084pgv.113.1523637478869; Fri, 13 Apr 2018 09:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523637478; cv=none; d=google.com; s=arc-20160816; b=UXUMDe9g8daXiQOVFzNbFuzgRGkyzNIYvw89YqYx7lwOTHk1kO6MBfgyF+iC64Yh+w tDS3BNFAh9PyN5M+xrJVhao0OE+dEMdVW5b9vmyWpAe3LvVMWPbp9ux4kxTfXeGrJ8ei HUHH1Pt/C3bKI94N0cT0cuOcKyP/AC7bYX3uNKXIubevIgLgwJY8YJTF7Ra60mtO7h5g 5A5GoVj4iyRhG2Ytb3BRDViZOuJgZXoV3qQxwwwAUYzKuYFAsFxioDrajb0mLCRU4bnw GY1BRfc0TzYynXFo6tion0b/RJyhRJ34Eop4ZqtLASpBgy5KwczA3j15wP2OTFtqT85F uw3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=866Uy8WAFFe64AkaIT3hMDMg8fsaDxr+Kscy9Oeenv8=; b=NioUj3vGfStzWTDWkzUaZ1ZPtkwv7ijFpFAFrAE+XhKDeSfqShMWiMvGSs4wAqMV4c DB1cwOK7ZyltxDud1Lu/kNdoLMK6p7tBbISINsEaKmO7g/8UOSbax2dc67ndsQqPLYku 83tQml/KXnJKwyk/Upon1ik7ePaBRGuFjLiDslDjwk1B1jbsQyBlxQZ50c82e2tdY8GO EAC15vkCHM92N20Rc9a1wNJADJRu03Rc/1Lvo/mJXsS47D6KIldz2bAy9Ra8QG7UGnzt EiKFN/hw26skimmrAIfDEzgjQO9TkOYmKbdZDTBRaC2m4liHHewApX+v1zq8GmWyGbE6 nH7A== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12-v6si4928793ply.353.2018.04.13.09.37.44; Fri, 13 Apr 2018 09:37:58 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752223AbeDMQgn (ORCPT + 99 others); Fri, 13 Apr 2018 12:36:43 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52060 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751489AbeDMQgg (ORCPT ); Fri, 13 Apr 2018 12:36:36 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3DGSdOG103647 for ; Fri, 13 Apr 2018 12:36:36 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2haw9r1ch6-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 13 Apr 2018 12:36:35 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Apr 2018 17:36:34 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Apr 2018 17:36:31 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3DGaU9A12255612; Fri, 13 Apr 2018 16:36:30 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A2374C044; Fri, 13 Apr 2018 17:29:07 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D77CD4C040; Fri, 13 Apr 2018 17:29:06 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 13 Apr 2018 17:29:06 +0100 (BST) From: Steffen Maier To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Cc: Steven Rostedt , Ingo Molnar , Jens Axboe , Li Zefan , Greg Kroah-Hartman , Steffen Maier Subject: [PATCH v2 1/2] tracing/events: block: track and print if unplug was explicit or schedule Date: Fri, 13 Apr 2018 18:36:21 +0200 X-Mailer: git-send-email 2.13.5 In-Reply-To: <20180413163623.11282-1-maier@linux.ibm.com> References: <20180413163623.11282-1-maier@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18041316-0040-0000-0000-0000044D4849 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041316-0041-0000-0000-000020F181B2 Message-Id: <20180413163623.11282-2-maier@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-13_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804130152 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just like blktrace distinguishes explicit and schedule by means of BLK_TA_UNPLUG_IO and BLK_TA_UNPLUG_TIMER, actually make use of the existing argument "explicit" to distinguish the two cases in the one common tracepoint block_unplug. Complements v2.6.39 commit 49cac01e1fa7 ("block: make unplug timer trace event correspond to the schedule() unplug") and commit d9c978331790 ("block: remove block_unplug_timer() trace point"). Signed-off-by: Steffen Maier --- Changes since v1: Use 0 and 1 instead of false and true for __print_symbolic table. Now "trace-cmd report" can decode it. [Steven Rostedt] include/trace/events/block.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 81b43f5bdf23..e90bb6eb8097 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -470,6 +470,11 @@ TRACE_EVENT(block_plug, TP_printk("[%s]", __entry->comm) ); +#define show_block_unplug_explicit(val) \ + __print_symbolic(val, \ + {0, "schedule"}, \ + {1, "explicit"}) + DECLARE_EVENT_CLASS(block_unplug, TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), @@ -478,15 +483,18 @@ DECLARE_EVENT_CLASS(block_unplug, TP_STRUCT__entry( __field( int, nr_rq ) + __field( bool, explicit ) __array( char, comm, TASK_COMM_LEN ) ), TP_fast_assign( __entry->nr_rq = depth; + __entry->explicit = explicit; memcpy(__entry->comm, current->comm, TASK_COMM_LEN); ), - TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) + TP_printk("[%s] %d %s", __entry->comm, __entry->nr_rq, + show_block_unplug_explicit(__entry->explicit)) ); /** -- 2.13.5