Skip to contentSkip to conversation

xentrace event mask for memory management class

PATCH In review INAKOSHI Hiroya 2 participants 3 messages Aug 18, 2006 – Aug 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xentrace event mask for memory management class

Since TRC_MEM is defined as 0x000af000 in xen/include/public/trace.h, TRC_MEM = TRC_SCHED | TRC_VMX. I feel strange about this. I do not think scheduling is a part of memory management. Am I right?

If not, please tell me the background TRC_MEM is defined as TRC_SCHED | TRC_VMX. If so, please apply this patch.

This patch defines TRC_MEM as an independent event mask. In addition, xentrace accepts '-e mem' option so that it puts memory management events in trace buffers. The manual page (xentrace.8) is also modified accordingly.

Tested by compiling on x86 and ia64, booting Dom0 and DomU, taking a xentrace log with '-e mem' option.

# HG changeset patch
# User [email protected]
# Node ID 408bc956d5cb00816bc1c903e53f74d590d96cec
# Parent ec03b24a2d83273ec62db8596506b80577a0e41e
This patch defines TRC_MEM as an independent event mask. In addition, xentrace accepts '-e mem' option so that it puts memory management events in trace buffers. The manual page (xentrace.8) is also modified accordingly.

Tested by compiling on x86 and ia64, booting Dom0 and DomU, taking a xentrace log with '-e mem' option.

tools/xentrace/xentrace.8 +4 -4
diff -r ec03b24a2d83 -r 408bc956d5cb tools/xentrace/xentrace.8
@@ -61,7 +61,7 @@ gathered by xentrace:
         0x0002f000          TRC_SCHED
         0x0004f000          TRC_DOM0OP          
         0x0008f000          TRC_VMX
-        0x000af000          TRC_MEM
+        0x0010f000          TRC_MEM
         0xfffff000          TRC_ALL 
 
 
@@ -99,9 +99,9 @@ collects the following events from the t
         0x0002f014         TRC_SCHED_SWITCH_INFPREV
         0x0002f015         TRC_SCHED_SWITCH_INFNEXT
 
-        0x000af001         TRC_MEM_PAGE_GRANT_MAP
-        0x000af002         TRC_MEM_PAGE_GRANT_UNMAP
-        0x000af003         TRC_MEM_PAGE_GRANT_TRANSFER
+        0x0010f001         TRC_MEM_PAGE_GRANT_MAP
+        0x0010f002         TRC_MEM_PAGE_GRANT_UNMAP
+        0x0010f003         TRC_MEM_PAGE_GRANT_TRANSFER
 
         0x00081001         TRC_VMX_VMEXIT
         0x00081002         TRC_VMX_VMENTRY
tools/xentrace/xentrace.c +2 -0
diff -r ec03b24a2d83 -r 408bc956d5cb tools/xentrace/xentrace.c
@@ -348,6 +348,8 @@ int parse_evtmask(char *arg, struct argp
         setup->evt_mask |= TRC_DOM0OP;
     } else if(strcmp(arg, "vmx") == 0){ 
         setup->evt_mask |= TRC_VMX;
+    } else if(strcmp(arg, "mem") == 0){ 
+        setup->evt_mask |= TRC_MEM;
     } else if(strcmp(arg, "all") == 0){ 
         setup->evt_mask |= TRC_ALL;
     } else {
xen/include/public/trace.h +1 -1
diff -r ec03b24a2d83 -r 408bc956d5cb xen/include/public/trace.h
@@ -14,7 +14,7 @@
 #define TRC_SCHED   0x0002f000    /* Xen Scheduler trace      */
 #define TRC_DOM0OP  0x0004f000    /* Xen DOM0 operation trace */
 #define TRC_VMX     0x0008f000    /* Xen VMX trace            */
-#define TRC_MEM     0x000af000    /* Xen memory trace         */
+#define TRC_MEM     0x0010f000    /* Xen memory trace         */
 #define TRC_ALL     0xfffff000
 
 /* Trace subclasses */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 3 lines

Since TRC_MEM is defined as 0x000af000 in xen/include/public/trace.h, TRC_MEM = TRC_SCHED | TRC_VMX. I feel strange about this. I do not think scheduling is a part of memory management. Am I right?

Looks to me like it's probably a typo that hasn't been spotted before - well done.

Quoted 7 lines

This patch defines TRC_MEM as an independent event mask. In addition, xentrace accepts '-e mem' option so that it puts memory management events in trace buffers. The manual page (xentrace.8) is also modified accordingly.

Tested by compiling on x86 and ia64, booting Dom0 and DomU, taking a xentrace log with '-e mem' option.

Thanks for the thorough testing and for updating the man page!

The patch looks fine to me.

+1

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
#2 lore raw
In reply to INAKOSHI Hiroya

Hi,

The patch for xentrace I posted has not been applied yet. This patch is just for correcting a typo, as Mark said, and is harmless. Please apply. Thanks.

Hiroya.

Quoted 25 lines · INAKOSHI Hiroya

Since TRC_MEM is defined as 0x000af000 in xen/include/public/trace.h, TRC_MEM = TRC_SCHED | TRC_VMX. I feel strange about this. I do not think scheduling is a part of memory management. Am I right?

If not, please tell me the background TRC_MEM is defined as TRC_SCHED | TRC_VMX. If so, please apply this patch.

This patch defines TRC_MEM as an independent event mask. In addition, xentrace accepts '-e mem' option so that it puts memory management events in trace buffers. The manual page (xentrace.8) is also modified accordingly.

Tested by compiling on x86 and ia64, booting Dom0 and DomU, taking a xentrace log with '-e mem' option.

------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 2 lines
富士通株式会社 プラットフォーム技術開発本部 仮想システム開発統括部
稲越宏弥 <[email protected]>