|
7 | 7 |
|
8 | 8 | #include <linux/dlm.h>
|
9 | 9 | #include <linux/dlmconstants.h>
|
| 10 | +#include <uapi/linux/dlm_plock.h> |
10 | 11 | #include <linux/tracepoint.h>
|
11 | 12 |
|
12 | 13 | #include "../../../fs/dlm/dlm_internal.h"
|
@@ -585,6 +586,56 @@ TRACE_EVENT(dlm_recv_message,
|
585 | 586 |
|
586 | 587 | );
|
587 | 588 |
|
| 589 | +DECLARE_EVENT_CLASS(dlm_plock_template, |
| 590 | + |
| 591 | + TP_PROTO(const struct dlm_plock_info *info), |
| 592 | + |
| 593 | + TP_ARGS(info), |
| 594 | + |
| 595 | + TP_STRUCT__entry( |
| 596 | + __field(uint8_t, optype) |
| 597 | + __field(uint8_t, ex) |
| 598 | + __field(uint8_t, wait) |
| 599 | + __field(uint8_t, flags) |
| 600 | + __field(uint32_t, pid) |
| 601 | + __field(int32_t, nodeid) |
| 602 | + __field(int32_t, rv) |
| 603 | + __field(uint32_t, fsid) |
| 604 | + __field(uint64_t, number) |
| 605 | + __field(uint64_t, start) |
| 606 | + __field(uint64_t, end) |
| 607 | + __field(uint64_t, owner) |
| 608 | + ), |
| 609 | + |
| 610 | + TP_fast_assign( |
| 611 | + __entry->optype = info->optype; |
| 612 | + __entry->ex = info->ex; |
| 613 | + __entry->wait = info->wait; |
| 614 | + __entry->flags = info->flags; |
| 615 | + __entry->pid = info->pid; |
| 616 | + __entry->nodeid = info->nodeid; |
| 617 | + __entry->rv = info->rv; |
| 618 | + __entry->fsid = info->fsid; |
| 619 | + __entry->number = info->number; |
| 620 | + __entry->start = info->start; |
| 621 | + __entry->end = info->end; |
| 622 | + __entry->owner = info->owner; |
| 623 | + ), |
| 624 | + |
| 625 | + TP_printk("fsid=%u number=%llx owner=%llx optype=%d ex=%d wait=%d flags=%x pid=%u nodeid=%d rv=%d start=%llx end=%llx", |
| 626 | + __entry->fsid, __entry->number, __entry->owner, |
| 627 | + __entry->optype, __entry->ex, __entry->wait, |
| 628 | + __entry->flags, __entry->pid, __entry->nodeid, |
| 629 | + __entry->rv, __entry->start, __entry->end) |
| 630 | + |
| 631 | +); |
| 632 | + |
| 633 | +DEFINE_EVENT(dlm_plock_template, dlm_plock_read, |
| 634 | + TP_PROTO(const struct dlm_plock_info *info), TP_ARGS(info)); |
| 635 | + |
| 636 | +DEFINE_EVENT(dlm_plock_template, dlm_plock_write, |
| 637 | + TP_PROTO(const struct dlm_plock_info *info), TP_ARGS(info)); |
| 638 | + |
588 | 639 | TRACE_EVENT(dlm_send,
|
589 | 640 |
|
590 | 641 | TP_PROTO(int nodeid, int ret),
|
|
0 commit comments