diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:06:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:06:47 -0400 |
commit | c61264f98c1a974ee6f545f61a4ab33b141d6bda (patch) | |
tree | 490e82c3bbf1403098b582f589eec378be727d4c /arch/x86/include/asm/xen | |
parent | a23a334bd547e9462d9ca4a74608519a1e928848 (diff) | |
parent | bd9ddc875b6659f9f74dcfd285c472bc58041abd (diff) |
Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen/trace: use class for multicall trace
xen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()
xen/multicall: move *idx fields to start of mc_buffer
xen/multicall: special-case singleton hypercalls
xen/multicalls: add unlikely around slowpath in __xen_mc_entry()
xen/multicalls: disable MC_DEBUG
xen/mmu: tune pgtable alloc/release
xen/mmu: use extend_args for more mmuext updates
xen/trace: add tlb flush tracepoints
xen/trace: add segment desc tracing
xen/trace: add xen_pgd_(un)pin tracepoints
xen/trace: add ptpage alloc/release tracepoints
xen/trace: add mmu tracepoints
xen/trace: add multicall tracing
xen/trace: set up tracepoint skeleton
xen/multicalls: remove debugfs stats
trace/xen: add skeleton for Xen trace events
Diffstat (limited to 'arch/x86/include/asm/xen')
-rw-r--r-- | arch/x86/include/asm/xen/hypercall.h | 22 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/trace_types.h | 18 |
2 files changed, 40 insertions, 0 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index d240ea950519..417777de5a40 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/types.h> | 40 | #include <linux/types.h> |
41 | 41 | ||
42 | #include <trace/events/xen.h> | ||
43 | |||
42 | #include <asm/page.h> | 44 | #include <asm/page.h> |
43 | #include <asm/pgtable.h> | 45 | #include <asm/pgtable.h> |
44 | 46 | ||
@@ -459,6 +461,8 @@ MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) | |||
459 | { | 461 | { |
460 | mcl->op = __HYPERVISOR_fpu_taskswitch; | 462 | mcl->op = __HYPERVISOR_fpu_taskswitch; |
461 | mcl->args[0] = set; | 463 | mcl->args[0] = set; |
464 | |||
465 | trace_xen_mc_entry(mcl, 1); | ||
462 | } | 466 | } |
463 | 467 | ||
464 | static inline void | 468 | static inline void |
@@ -475,6 +479,8 @@ MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | |||
475 | mcl->args[2] = new_val.pte >> 32; | 479 | mcl->args[2] = new_val.pte >> 32; |
476 | mcl->args[3] = flags; | 480 | mcl->args[3] = flags; |
477 | } | 481 | } |
482 | |||
483 | trace_xen_mc_entry(mcl, sizeof(new_val) == sizeof(long) ? 3 : 4); | ||
478 | } | 484 | } |
479 | 485 | ||
480 | static inline void | 486 | static inline void |
@@ -485,6 +491,8 @@ MULTI_grant_table_op(struct multicall_entry *mcl, unsigned int cmd, | |||
485 | mcl->args[0] = cmd; | 491 | mcl->args[0] = cmd; |
486 | mcl->args[1] = (unsigned long)uop; | 492 | mcl->args[1] = (unsigned long)uop; |
487 | mcl->args[2] = count; | 493 | mcl->args[2] = count; |
494 | |||
495 | trace_xen_mc_entry(mcl, 3); | ||
488 | } | 496 | } |
489 | 497 | ||
490 | static inline void | 498 | static inline void |
@@ -504,6 +512,8 @@ MULTI_update_va_mapping_otherdomain(struct multicall_entry *mcl, unsigned long v | |||
504 | mcl->args[3] = flags; | 512 | mcl->args[3] = flags; |
505 | mcl->args[4] = domid; | 513 | mcl->args[4] = domid; |
506 | } | 514 | } |
515 | |||
516 | trace_xen_mc_entry(mcl, sizeof(new_val) == sizeof(long) ? 4 : 5); | ||
507 | } | 517 | } |
508 | 518 | ||
509 | static inline void | 519 | static inline void |
@@ -520,6 +530,8 @@ MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr, | |||
520 | mcl->args[2] = desc.a; | 530 | mcl->args[2] = desc.a; |
521 | mcl->args[3] = desc.b; | 531 | mcl->args[3] = desc.b; |
522 | } | 532 | } |
533 | |||
534 | trace_xen_mc_entry(mcl, sizeof(maddr) == sizeof(long) ? 2 : 4); | ||
523 | } | 535 | } |
524 | 536 | ||
525 | static inline void | 537 | static inline void |
@@ -528,6 +540,8 @@ MULTI_memory_op(struct multicall_entry *mcl, unsigned int cmd, void *arg) | |||
528 | mcl->op = __HYPERVISOR_memory_op; | 540 | mcl->op = __HYPERVISOR_memory_op; |
529 | mcl->args[0] = cmd; | 541 | mcl->args[0] = cmd; |
530 | mcl->args[1] = (unsigned long)arg; | 542 | mcl->args[1] = (unsigned long)arg; |
543 | |||
544 | trace_xen_mc_entry(mcl, 2); | ||
531 | } | 545 | } |
532 | 546 | ||
533 | static inline void | 547 | static inline void |
@@ -539,6 +553,8 @@ MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req, | |||
539 | mcl->args[1] = count; | 553 | mcl->args[1] = count; |
540 | mcl->args[2] = (unsigned long)success_count; | 554 | mcl->args[2] = (unsigned long)success_count; |
541 | mcl->args[3] = domid; | 555 | mcl->args[3] = domid; |
556 | |||
557 | trace_xen_mc_entry(mcl, 4); | ||
542 | } | 558 | } |
543 | 559 | ||
544 | static inline void | 560 | static inline void |
@@ -550,6 +566,8 @@ MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count, | |||
550 | mcl->args[1] = count; | 566 | mcl->args[1] = count; |
551 | mcl->args[2] = (unsigned long)success_count; | 567 | mcl->args[2] = (unsigned long)success_count; |
552 | mcl->args[3] = domid; | 568 | mcl->args[3] = domid; |
569 | |||
570 | trace_xen_mc_entry(mcl, 4); | ||
553 | } | 571 | } |
554 | 572 | ||
555 | static inline void | 573 | static inline void |
@@ -558,6 +576,8 @@ MULTI_set_gdt(struct multicall_entry *mcl, unsigned long *frames, int entries) | |||
558 | mcl->op = __HYPERVISOR_set_gdt; | 576 | mcl->op = __HYPERVISOR_set_gdt; |
559 | mcl->args[0] = (unsigned long)frames; | 577 | mcl->args[0] = (unsigned long)frames; |
560 | mcl->args[1] = entries; | 578 | mcl->args[1] = entries; |
579 | |||
580 | trace_xen_mc_entry(mcl, 2); | ||
561 | } | 581 | } |
562 | 582 | ||
563 | static inline void | 583 | static inline void |
@@ -567,6 +587,8 @@ MULTI_stack_switch(struct multicall_entry *mcl, | |||
567 | mcl->op = __HYPERVISOR_stack_switch; | 587 | mcl->op = __HYPERVISOR_stack_switch; |
568 | mcl->args[0] = ss; | 588 | mcl->args[0] = ss; |
569 | mcl->args[1] = esp; | 589 | mcl->args[1] = esp; |
590 | |||
591 | trace_xen_mc_entry(mcl, 2); | ||
570 | } | 592 | } |
571 | 593 | ||
572 | #endif /* _ASM_X86_XEN_HYPERCALL_H */ | 594 | #endif /* _ASM_X86_XEN_HYPERCALL_H */ |
diff --git a/arch/x86/include/asm/xen/trace_types.h b/arch/x86/include/asm/xen/trace_types.h new file mode 100644 index 000000000000..21e1874c0a0b --- /dev/null +++ b/arch/x86/include/asm/xen/trace_types.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _ASM_XEN_TRACE_TYPES_H | ||
2 | #define _ASM_XEN_TRACE_TYPES_H | ||
3 | |||
4 | enum xen_mc_flush_reason { | ||
5 | XEN_MC_FL_NONE, /* explicit flush */ | ||
6 | XEN_MC_FL_BATCH, /* out of hypercall space */ | ||
7 | XEN_MC_FL_ARGS, /* out of argument space */ | ||
8 | XEN_MC_FL_CALLBACK, /* out of callback space */ | ||
9 | }; | ||
10 | |||
11 | enum xen_mc_extend_args { | ||
12 | XEN_MC_XE_OK, | ||
13 | XEN_MC_XE_BAD_OP, | ||
14 | XEN_MC_XE_NO_SPACE | ||
15 | }; | ||
16 | typedef void (*xen_mc_callback_fn_t)(void *); | ||
17 | |||
18 | #endif /* _ASM_XEN_TRACE_TYPES_H */ | ||