Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6060679imm; Sat, 19 May 2018 16:27:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGxi3XVe/nr/c0PUj7mxda+BEtnv4pms8WaPo5dSBoukYN2+DqQPq+eHHNhlEKAjM+rwxs X-Received: by 2002:a63:7f13:: with SMTP id a19-v6mr4313943pgd.444.1526772478113; Sat, 19 May 2018 16:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526772478; cv=none; d=google.com; s=arc-20160816; b=M1N08yGbF7+ppsSDIZw0qi9vu/K3uGEDxDDKGQFFkjCSS00L9tEYVX/Ck1Wh1ejMYy PIFEmkD3efKTEjK3NoZxZYJwFG4oZJdmZR9HC6dML3yp2riHxcGGRSHK6JdrYHb9qcEb 5t0GIWqBBVwCX+auZcjBNGmL6Ytxdu+67/8JpxDL8sZ8K+L4bI6dYLFOOGs/JTg7Vs1t lhL2KfDUz5YWiCwuF5jMOV8RUHbIwRYrgzFUDfR5P18IYKQBjXF6xPG9OBBYn/OaWScN CY/elVJZLbZP15SbKHcUVfdaeky3Jyor8y2svZfdYvvHpDinnCxETds0ZLyzXWMmTDwY sH9Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=dbJhFLalRw3cqlEy1gzyibAhq1XfDplycrtrtp7y2gA=; b=M6wLYcq1Rcsz+jSsOxAMvMkda2Dnzkz5aQudR9Nsq2my5EowFb0tMrIGfKQMyPIzG9 WadgfBFwa/vu0o8CTFd4ZCGYMFlOe1CWd3QtjfnRAZhEuAPC/Fzpe8Ti0QI+41jev5gT npVvxCzFJcBYmJaQfzamFv3LfpOiBNrWu+U121E3ht5Bupcg/iDhvHQLvRwwPrqkuDpK 3+NwYYYsQSlkCVQz+XbHuvTaDsKA34rVV+Qw0oOVaLNduRAJZ/bWD5oxrXystD5+cjlp ktsf8Q3prD9oywIjzVR6/8QHA8xvuhHtElddXwG5HWJYYYz4YUKBEJ+Nv0mV2qCqNKXZ nuvg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59-v6si10677176plb.106.2018.05.19.16.27.09; Sat, 19 May 2018 16:27: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752530AbeESXXD (ORCPT + 99 others); Sat, 19 May 2018 19:23:03 -0400 Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:17328 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbeESXXB (ORCPT ); Sat, 19 May 2018 19:23:01 -0400 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail06.adl6.internode.on.net with ESMTP; 20 May 2018 08:52:58 +0930 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1fKBBh-0003C4-LZ; Sun, 20 May 2018 09:22:57 +1000 Date: Sun, 20 May 2018 09:22:57 +1000 From: Dave Chinner To: Steve French Cc: Ralph =?iso-8859-1?Q?B=F6hme?= , CIFS , LKML , samba-technical , linux-fsdevel Subject: Re: [PATCHv2][SMB3] Add kernel trace support Message-ID: <20180519232257.GL10363@dastard> References: <20180518184630.axfa7oq4pewb7foj@kazak> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 01:43:14PM -0700, Steve French wrote: > On Fri, May 18, 2018 at 11:46 AM, Ralph B?hme wrote: > > On Thu, May 17, 2018 at 09:36:36PM -0500, Steve French via samba-technical wrote: > >> Patch updated with additional tracepoint locations and some formatting > >> improvements. There are some obvious additional tracepoints that could > >> be added, but this should be a reasonable group to start with. > >> > >> From edc02d6f9dc24963d510c7ef59067428d3b082d3 Mon Sep 17 00:00:00 2001 > >> From: Steve French > >> Date: Thu, 17 May 2018 21:16:55 -0500 > >> Subject: [PATCH] smb3: Add ftrace tracepoints for improved SMB3 debugging > >> > >> Although dmesg logs and wireshark network traces can be > >> helpful, being able to dynamically enable/disable tracepoints > >> (in this case via the kernel ftrace mechanism) can also be > >> helpful in more quickly debugging problems, and more > >> selectively tracing the events related to the bug report. > >> > >> This patch adds 12 ftrace tracepoints to cifs.ko for SMB3 events > >> in some obvious locations. Subsequent patches will add more > >> as needed. > >> > >> Example use: > >> trace-cmd record -e cifs > >> > >> trace-cmd show > > > > pardon my ignorance, but are these tracepoints usable with other tracing > > frameworks like Systemtap? > > > > Last time I checked, Systemtap looked like *the* tool. Systemtap is great when you have a need for custom tracing. But for day-to-day kernel development, tracepoints are far more useful because they are always there and can cover all the common situations that you need to trace. And when it comes to debugging a one-off user problem when the user knows nothing about systemtap? Nothing beats asking the user to run a trace on built-in tracepoints, reproduce the problem and send the trace report back as per the above example. > > Is there a generic trace > > point infrastructure that tracing tools can consume, so we're not tied to > > ftrace? > > At the kernel filesystem/mm summit a few recommended using ftrace > (trace-cmd). Don't know what > the thinking is about this vs. systemtap these days. There was a nice > three part series > describing ftrace/trace-cmd on lwn > (https://old.lwn.net/Articles/365835/) a while ago. > > In terms of useability "trace-cmd" looked good to me and much more > powerful than the > current dmesg based printk style debugging. And then you learn about trace_printk() for putting custom one-off debug into the tracepoint stream and wonder why you didn't know about this years ago :P Cheers, Dave. -- Dave Chinner david@fromorbit.com