Received: by 10.213.65.68 with SMTP id h4csp1509392imn; Thu, 15 Mar 2018 01:26:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtAdTIuYRKZSVvAr5LYSNjn6mKxvyR23noJ159ynj9d8rvVgUAOD7OodeCMW0I46H6kZ2EC X-Received: by 10.99.110.133 with SMTP id j127mr6175685pgc.79.1521102419685; Thu, 15 Mar 2018 01:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521102419; cv=none; d=google.com; s=arc-20160816; b=R09lFtXG2lVWuSCMlstyhryE1Ou1ZzDKdMTuEd5Sb6tbUfS1ApQLX02A0DNaOrYHhm UWLuWVAsrTNk3lBpbDsX1ZUb13VjhSEUhBiqtqIz9QoP1gnywxO18Os0UswW/dFPx9Q+ in98twr/rFaJF7nY1oS5IlajGfPmMne8uQ5CPF753D69hEAErsnJCuP6sHT1Vbg2MPKF A+g3yd/rajvgu313ZZOETTODxT+lvklBlqL7Ki64BuzAJhv+V1qxYwDE04r5ywpLgDPd Kb1BVvOYLxj4DlaMqyDfn5EWOvhVFCwnDt01Od5w71ohyWFvyeZLbI4Ae4jCk6/2oL3L E4Sw== 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=6JkAdDF2aICONbMh3VRSiLWxGo+H8B/QR57vKA/fhkQ=; b=eShnYUR6WBT8MFfqa/cqzbKf4MvMSceeif8vMREn6BBQMTt4Y9XJQFNndZlxSxE7iV KTDx1Eyevbx9NPBfKnchd3gqJ0BgfVBBbZrxs8c6Eh4wkkLc5U1r8X/YGalxLljSLoGo hVqVL5nZLtBAu999uiIK1aC/zbl7a9Q9e3/A+d3PIn2e0OO7cLqghxevhyGpCeOj4Cly 7L+asfnoU76UuZZP12UkA8oWdhB8IToB1Tx+xS0herZntVaNBeN4ooMdNRem/6Ygk85p i1M6XhXgIslgyXx+WsQycmtpul4PL4J3X595C/FcX89I0d+V1FGr0ey1RgomHKGh8Jd5 ndCA== 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 m11-v6si3650509pln.350.2018.03.15.01.26.45; Thu, 15 Mar 2018 01:26:59 -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 S1751715AbeCOIZo (ORCPT + 99 others); Thu, 15 Mar 2018 04:25:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58098 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750777AbeCOIZm (ORCPT ); Thu, 15 Mar 2018 04:25:42 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2F8Og2E050952 for ; Thu, 15 Mar 2018 04:25:42 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gqhr6qm28-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 15 Mar 2018 04:25:41 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Mar 2018 08:25:40 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 15 Mar 2018 08:25:36 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2F8PaZ052363394; Thu, 15 Mar 2018 08:25:36 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F1EC11C050; Thu, 15 Mar 2018 08:18:13 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2DF711C066; Thu, 15 Mar 2018 08:18:11 +0000 (GMT) Received: from bangoria.in.ibm.com (unknown [9.124.31.132]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 15 Mar 2018 08:18:11 +0000 (GMT) From: Ravi Bangoria To: rostedt@goodmis.org, linux-kernel@vger.kernel.org, keescook@chromium.org Cc: wangnan0@huawei.com, mingo@redhat.com, srikar@linux.vnet.ibm.com, oleg@redhat.com, mhiramat@kernel.org, namhyung@kernel.org, Ravi Bangoria Subject: [PATCH v2 2/2] trace_uprobe: Simplify probes_seq_show() Date: Thu, 15 Mar 2018 13:57:56 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315082756.9050-1-ravi.bangoria@linux.vnet.ibm.com> References: <20180315082756.9050-1-ravi.bangoria@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18031508-0012-0000-0000-000005BEECA6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031508-0013-0000-0000-0000193AF551 Message-Id: <20180315082756.9050-2-ravi.bangoria@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-15_04:,, 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-1803150097 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify probes_seq_show() function. No change in output before and after patch. Signed-off-by: Ravi Bangoria --- kernel/trace/trace_uprobe.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 0298bd15be83..544fa10a471b 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -602,24 +602,9 @@ static int probes_seq_show(struct seq_file *m, void *v) char c = is_ret_probe(tu) ? 'r' : 'p'; int i; - seq_printf(m, "%c:%s/%s", c, tu->tp.call.class->system, - trace_event_name(&tu->tp.call)); - seq_printf(m, " %s:", tu->filename); - - /* Don't print "0x (null)" when offset is 0 */ - if (tu->offset) { - seq_printf(m, "0x%0*lx", (int)(sizeof(void *) * 2), tu->offset); - } else { - switch (sizeof(void *)) { - case 4: - seq_printf(m, "0x00000000"); - break; - case 8: - default: - seq_printf(m, "0x0000000000000000"); - break; - } - } + seq_printf(m, "%c:%s/%s %s:0x%0*lx", c, tu->tp.call.class->system, + trace_event_name(&tu->tp.call), tu->filename, + (int)(sizeof(void *) * 2), tu->offset); for (i = 0; i < tu->tp.nr_args; i++) seq_printf(m, " %s=%s", tu->tp.args[i].name, tu->tp.args[i].comm); -- 2.13.6