I like /proc/pid/perfctr interface (virtual PMC mode).
The following patch should be included into the main line kernel,
shouldn't it?
--- linux-2.5.62-perfctr/include/asm-i386/processor.h.~1~ 2003-02-18 02:06
:53.000000000 +0100
+++ linux-2.5.62-perfctr/include/asm-i386/processor.h 2003-02-18 02:18:36.0000
00000 +0100
@@ -372,6 +372,11 @@
unsigned long __cacheline_filler[5];
};
+/*
+ * Virtual per-process performance-monitoring counters.
+ */
+struct vperfctr; /* opaque; no need to depend on <linux/perfctr.h> */
+
struct thread_struct {
/* cached TLS descriptors. */
struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
@@ -393,6 +398,8 @@
unsigned int saved_fs, saved_gs;
/* IO permissions */
unsigned long *ts_io_bitmap;
+/* performance counters */
+ struct vperfctr *perfctr;
};
#define INIT_THREAD { \
---------------------------------------------
I think a per process (thread) performance monitoring is very
important.
Thanks in advance,
Hiro
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/