Skip to contentSkip to conversation

move gfs2 tracepoints to inclue/trace/events dir

PATCH Jason Baron 4 participants 11 messages Oct 9, 2009 – Oct 25, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

thanks,

-Jason

---

 fs/gfs2/bmap.c              |    2 
 fs/gfs2/glock.c             |    3 
 fs/gfs2/log.c               |    2 
 fs/gfs2/lops.c              |    2 
 fs/gfs2/ops_fstype.c        |    2 
 fs/gfs2/rgrp.c              |    2 
 fs/gfs2/trace_gfs2.h        |  407 -------------------------------------------
 include/trace/events/gfs2.h |  404 +++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 411 insertions(+), 413 deletions(-)
 delete mode 100644 fs/gfs2/trace_gfs2.h
 create mode 100644 include/trace/events/gfs2.h
fs/gfs2/bmap.c +1 -1
index 6d47379..5e630c3 100644
@@ -13,6 +13,7 @@
 #include <linux/buffer_head.h>
 #include <linux/gfs2_ondisk.h>
 #include <linux/crc32.h>
+#include <trace/events/gfs2.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -25,7 +26,6 @@
 #include "trans.h"
 #include "dir.h"
 #include "util.h"
-#include "trace_gfs2.h"
 
 /* This doesn't need to be that large as max 64 bit pointers in a 4k
  * block is 512, so __u16 is fine for that. It saves stack space to
fs/gfs2/glock.c +2 -1
index a3f90ad..1239076 100644
@@ -39,8 +39,9 @@
 #include "super.h"
 #include "util.h"
 #include "bmap.h"
+
 #define CREATE_TRACE_POINTS
-#include "trace_gfs2.h"
+#include <trace/events/gfs2.h>
 
 struct gfs2_gl_hash_bucket {
         struct hlist_head hb_list;
fs/gfs2/log.c +1 -1
index 13c6237..70beadc 100644
@@ -18,6 +18,7 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/bio.h>
+#include <trace/events/gfs2.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -28,7 +29,6 @@
 #include "meta_io.h"
 #include "util.h"
 #include "dir.h"
-#include "trace_gfs2.h"
 
 #define PULL 1
 
fs/gfs2/lops.c +1 -1
index 9969ff0..c038ae6 100644
@@ -15,6 +15,7 @@
 #include <linux/gfs2_ondisk.h>
 #include <linux/bio.h>
 #include <linux/fs.h>
+#include <trace/events/gfs2.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -27,7 +28,6 @@
 #include "rgrp.h"
 #include "trans.h"
 #include "util.h"
-#include "trace_gfs2.h"
 
 /**
  * gfs2_pin - Pin a buffer in memory
fs/gfs2/ops_fstype.c +1 -1
index 36b11cb..6b3d6cb 100644
@@ -19,6 +19,7 @@
 #include <linux/gfs2_ondisk.h>
 #include <linux/slow-work.h>
 #include <linux/quotaops.h>
+#include <trace/events/gfs2.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -34,7 +35,6 @@
 #include "log.h"
 #include "quota.h"
 #include "dir.h"
-#include "trace_gfs2.h"
 
 #define DO 0
 #define UNDO 1
fs/gfs2/rgrp.c +1 -1
index 8f1cfb0..15332af 100644
@@ -15,6 +15,7 @@
 #include <linux/gfs2_ondisk.h>
 #include <linux/prefetch.h>
 #include <linux/blkdev.h>
+#include <trace/events/gfs2.h>
 
 #include "gfs2.h"
 #include "incore.h"
@@ -29,7 +30,6 @@
 #include "util.h"
 #include "log.h"
 #include "inode.h"
-#include "trace_gfs2.h"
 
 #define BFITNOENT ((u32)~0)
 #define NO_BLOCK ((u64)~0)
fs/gfs2/trace_gfs2.h deleted +0 -407

407 lines not on this page · raw message

include/trace/events/gfs2.h new file +404 -0

404 lines not on this page · raw message

#1 lore raw

Hi,

Quoted 8 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 4 lines

thanks,

-Jason

I've no objection to that, it sounds like a good plan. Should I stick this in the GFS2 tree, or would you rather keep it in the trace tree? I was thinking probably the GFS2 tree would be better as it reduces the chances of any future conflicts.

Quoted 3 lines

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
Quoted 11 lines · Steven Whitehouse

Hi,

Quoted 8 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 8 lines
Quoted 4 lines

thanks,

-Jason

I've no objection to that, it sounds like a good plan. Should I stick this in the GFS2 tree, or would you rather keep it in the trace tree? I was thinking probably the GFS2 tree would be better as it reduces the chances of any future conflicts.

gfs2 tree works for me.

thanks,

-Jason

#3 lore raw

Hi,

Quoted 21 lines · Jason Baron
Quoted 11 lines · Steven Whitehouse

Hi,

Quoted 8 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 8 lines
Quoted 4 lines

thanks,

-Jason

I've no objection to that, it sounds like a good plan. Should I stick this in the GFS2 tree, or would you rather keep it in the trace tree? I was thinking probably the GFS2 tree would be better as it reduces the chances of any future conflicts.

Quoted 6 lines

gfs2 tree works for me.

thanks,

-Jason

Ok, done. Should be appearing shortly. Thanks,

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to Jason Baron
Quoted 7 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Folks, no. Drivers and filesystems should be as self-contained as possible. include/trace/ is an extremly bad idea for everything that's not actually global kernel functionality. There's a reason all other fs headers have moved out of include/linux, too.

#5 lore raw

Hi,

Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 5 lines

Folks, no. Drivers and filesystems should be as self-contained as possible. include/trace/ is an extremly bad idea for everything that's not actually global kernel functionality. There's a reason all other fs headers have moved out of include/linux, too.

That true, although there is an argument about how much such a header belongs to tracing and how much it belongs to the subsystem I think. I'll drop the patch from my tree at the next update, until that can be resolved,

Steve.

#6 lore raw
Quoted 12 lines · Steven Whitehouse

Hi,

Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 8 lines
Quoted 5 lines

Folks, no. Drivers and filesystems should be as self-contained as possible. include/trace/ is an extremly bad idea for everything that's not actually global kernel functionality. There's a reason all other fs headers have moved out of include/linux, too.

That true, although there is an argument about how much such a header belongs to tracing and how much it belongs to the subsystem I think.

yeah. I have no objection to adding it to include/trace/. Tracepoints are a fundamentally global business.

Subsystems can opt to hide their tracepoints locally, but it's better to have a global view about what's out there, so that it can be extended coherently, etc.

Would you like to carry the patch or should we apply it to the tracing tree?

Ingo

#7 lore raw

Hi,

Quoted 26 lines · Ingo Molnar
Quoted 12 lines · Steven Whitehouse

Hi,

Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 8 lines
Quoted 5 lines

Folks, no. Drivers and filesystems should be as self-contained as possible. include/trace/ is an extremly bad idea for everything that's not actually global kernel functionality. There's a reason all other fs headers have moved out of include/linux, too.

That true, although there is an argument about how much such a header belongs to tracing and how much it belongs to the subsystem I think.

yeah. I have no objection to adding it to include/trace/. Tracepoints are a fundamentally global business.

Quoted 8 lines

Subsystems can opt to hide their tracepoints locally, but it's better to have a global view about what's out there, so that it can be extended coherently, etc.

Would you like to carry the patch or should we apply it to the tracing tree?

Ingo

It is already in my tree, but lets wait and see what Christoph says, as maybe we want to organise things differently. Personally I don't really mind where we put it, so long as it makes sense and I know where it is :-)

Steve.

#8 lore raw
In reply to Ingo Molnar
Quoted 6 lines · Ingo Molnar

yeah. I have no objection to adding it to include/trace/. Tracepoints are a fundamentally global business.

Subsystems can opt to hide their tracepoints locally, but it's better to have a global view about what's out there, so that it can be extended coherently, etc.

We're lacking quite a bit coherence even with it. The originally reason why there were global was that the infrastructure couldn't cope with having the either in modules or elsewhere in the source tree at all.

We have managed to avoid global directories for drivers/filesystems for as much as we can lately. Having everything in a directory makes sure it's self-contained and people don't use it accidentally from other modules, which also applies to trace events - we don't want people accidentally use gfs2 tracepoints from a driver (and if you think that's far fetched look at the recent example of a driver using debugging macros from the networking code that got pulled in accidentally somewhere).

#9 lore raw
Quoted 14 lines · Christoph Hellwig
Quoted 6 lines · Ingo Molnar

yeah. I have no objection to adding it to include/trace/. Tracepoints are a fundamentally global business.

Subsystems can opt to hide their tracepoints locally, but it's better to have a global view about what's out there, so that it can be extended coherently, etc.

We're lacking quite a bit coherence even with it. The originally reason why there were global was that the infrastructure couldn't cope with having the either in modules or elsewhere in the source tree at all.

Quoted 8 lines

We have managed to avoid global directories for drivers/filesystems for as much as we can lately. Having everything in a directory makes sure it's self-contained and people don't use it accidentally from other modules, which also applies to trace events - we don't want people accidentally use gfs2 tracepoints from a driver (and if you think that's far fetched look at the recent example of a driver using debugging macros from the networking code that got pulled in accidentally somewhere).

Tracepoints are closer to documentation than to filesystem functionality. And you are wrong when you say that everything related to filesystems is 'modular' - we have all documentation concentrated in Documentation/filesystems/ - and that is good so.

Just like we have library functions for filesystems concentrated in fs/*.c.

I think you are looking at it way too rigidly without considering the other side of the equation. Modularity has its costs: it hides details and makes it harder to compare implementations.

Ingo

#10 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Jason Baron

hi,

I'd like to move the gfs2 tracepoints to the the common include/trace/events directory along with all of the other trace events. It makes understanding what tracepoints are available easier, and I see no reason why gfs2 should be different. For example, 'ext4.h' is already in the include/trace/events directory.

Quoted 4 lines

Folks, no. Drivers and filesystems should be as self-contained as possible. include/trace/ is an extremly bad idea for everything that's not actually global kernel functionality. There's a reason all other fs headers have moved out of include/linux, too.

Tracing is special though - having global visibility of different tracepoints in one place helps keeping the set of tracepoints more consistent.

Self-contained tracepoints are fine too, but only as a second-tier choice for out-of-tree code or for subsystems that prefer that.

Ingo