On Thu, Nov 20, 2008 at 11:17 PM, ruby <ruby185@xxxxxxxxx> wrote: > Thanks for the reply and effort of trying this out. > would you mind spelling out the full ftrace command you used? > depends on what u want....i think it is better for u to fully understand the usage and meaning of this new technique.....just read Documentation/ftrace.txt. And for my script: #!/bin/bash mkdir /debug mount -t debugfs nodev /debug echo 0 >/debug/tracing/tracing_enabled echo 'ext3_*' 'journal_*' > /debug/tracing/set_ftrace_filter echo function >/debug/tracing/current_tracer echo 1 >/debug/tracing/tracing_enabled gedit /var/log/messages & sleep 3 echo 0 >/debug/tracing/tracing_enabled cat /debug/tracing/trace And the eliminating all those non "gedit" lines from the output we can see the flow kernel APIs being called.....for the above it is: gedit-4138 [001] 375.163088: ext3_permission <-inode_permission gedit-4138 [001] 375.163088: ext3_permission <-inode_permission gedit-4138 [001] 375.163101: ext3_dirty_inode <-__mark_inode_dirty gedit-4138 [001] 375.163101: ext3_journal_start_sb <-ext3_dirty_inode gedit-4138 [001] 375.163101: journal_start <-ext3_journal_start_sb gedit-4138 [001] 375.163103: ext3_mark_inode_dirty <-ext3_dirty_inode gedit-4138 [001] 375.163103: ext3_reserve_inode_write <-ext3_mark_inode_dirty gedit-4138 [001] 375.163103: ext3_get_inode_loc <-ext3_reserve_inode_write gedit-4138 [001] 375.163104: ext3_get_group_desc <-__ext3_get_inode_loc gedit-4138 [001] 375.163107: journal_get_write_access <-__ext3_journal_get_write_access gedit-4138 [001] 375.163107: journal_add_journal_head <-journal_get_write_access gedit-4138 [001] 375.163110: journal_cancel_revoke <-do_get_write_access gedit-4138 [001] 375.163110: journal_put_journal_head <-journal_get_write_access gedit-4138 [001] 375.163110: ext3_mark_iloc_dirty <-ext3_mark_inode_dirty gedit-4138 [001] 375.163111: ext3_get_inode_flags <-ext3_mark_iloc_dirty gedit-4138 [001] 375.163111: journal_dirty_metadata <-__ext3_journal_dirty_metadata gedit-4138 [001] 375.163112: journal_stop <-__ext3_journal_stop gedit-4138 [001] 375.163141: ext3_permission <-inode_permission gedit-4138 [001] 375.163142: ext3_permission <-inode_permission >From the above we can see how the ext3 filesystem uses the journal_* API to record its journal, caller-callee APIs relationship etc. If every line we can see a stacktrace, more information can be revealed. Thanks. -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ