From patchwork Thu Jan 12 20:58:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seiji Aguchi X-Patchwork-Id: 135691 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 12012B6FC5 for ; Fri, 13 Jan 2012 08:01:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755556Ab2ALVBQ (ORCPT ); Thu, 12 Jan 2012 16:01:16 -0500 Received: from usindpps06.hds.com ([207.126.252.19]:42927 "EHLO usindpps06.hds.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755346Ab2ALVBP convert rfc822-to-8bit (ORCPT ); Thu, 12 Jan 2012 16:01:15 -0500 Received: from usindmail01.hds.com (usindmail03 [207.126.252.22]) by usindpps06 (8.14.4/8.14.4) with ESMTP id q0CKwwqa014409; Thu, 12 Jan 2012 15:58:58 -0500 Received: from usindeht01.corp.hds.com (usindnetf5-vlan4float.corp.hds.com [10.74.12.196]) by usindmail01.hds.com (8.14.1/8.14.1) with ESMTP id q0CKwrKv010642; Thu, 12 Jan 2012 15:58:55 -0500 (EST) Received: from USINDEVS01.corp.hds.com ([10.74.24.171]) by usindeht01.corp.hds.com ([10.74.24.183]) with mapi; Thu, 12 Jan 2012 15:58:52 -0500 From: Seiji Aguchi To: "tytso@mit.edu" CC: "dle-develop@lists.sourceforge.net" , "linux-ext4@vger.kernel.org" , Lukas Czerner , "jack@suse.cz" , Satoru Moriya Date: Thu, 12 Jan 2012 15:58:51 -0500 Subject: [PATCH][RESEND]tracepoint: add drop_transaction/update_superblock_end to jbd2 Thread-Topic: [PATCH][RESEND]tracepoint: add drop_transaction/update_superblock_end to jbd2 Thread-Index: AczRbP0Ms8OlYSZIR6ixnV9uikKwEQ== Message-ID: <5C4C569E8A4B9B42A84A977CF070A35B2C5839432C@USINDEVS01.corp.hds.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: ja-JP, en-US MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201120232 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hello Ted, Please review this patch adding jbd2 tracepoints(and hopefully apply to your tree). This has already been accepted by Lukas and Jan. Seiji --- This patch adds trace_jbd2_drop_transaction and trace_jbd2_update_superblock_end because there are similar tracepoints in jbd and they are needed in jbd2 as well. Signed-off-by: Seiji Aguchi Reviewed-by: Lukas Czerner Acked-by: Jan Kara --- fs/jbd2/checkpoint.c | 2 ++ fs/jbd2/journal.c | 2 ++ include/trace/events/jbd2.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 16a698b..2bfd8b0 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -797,5 +797,7 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact J_ASSERT(journal->j_committing_transaction != transaction); J_ASSERT(journal->j_running_transaction != transaction); + trace_jbd2_drop_transaction(journal, transaction); + jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); } diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index f24df13..5953b3d 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1185,6 +1185,8 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait) } else write_dirty_buffer(bh, WRITE); + trace_jbd2_update_superblock_end(journal, wait); + out: /* If we have just flushed the log (by marking s_start==0), then * any future commit will have to be careful to update the diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 7596441..ae59bc2 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h @@ -81,6 +81,13 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging, TP_ARGS(journal, commit_transaction) ); +DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction, + + TP_PROTO(journal_t *journal, transaction_t *commit_transaction), + + TP_ARGS(journal, commit_transaction) +); + TRACE_EVENT(jbd2_end_commit, TP_PROTO(journal_t *journal, transaction_t *commit_transaction), @@ -229,6 +236,27 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, __entry->block_nr, __entry->freed) ); +TRACE_EVENT(jbd2_update_superblock_end, + + TP_PROTO(journal_t *journal, int wait), + + TP_ARGS(journal, wait), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( int, wait ) + ), + + TP_fast_assign( + __entry->dev = journal->j_fs_dev->bd_dev; + __entry->wait = wait; + ), + + TP_printk("dev %d,%d wait %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->wait) +); + #endif /* _TRACE_JBD2_H */ /* This part must be outside protection */