-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hyper-V balloon driver makes non-trivial calculations to convert Linux's representation of free/used memory to what Hyper-V host expects to see. Add a tracepoint to see what's being sent and where the data comes from. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Vitaly Kuznetsov
authored and
Greg Kroah-Hartman
committed
Mar 6, 2018
1 parent
bba072d
commit cf21be9
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM hyperv | ||
|
||
#if !defined(_HV_TRACE_BALLOON_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _HV_TRACE_BALLOON_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
TRACE_EVENT(balloon_status, | ||
TP_PROTO(u64 available, u64 committed, | ||
unsigned long vm_memory_committed, | ||
unsigned long pages_ballooned, | ||
unsigned long pages_added, | ||
unsigned long pages_onlined), | ||
TP_ARGS(available, committed, vm_memory_committed, | ||
pages_ballooned, pages_added, pages_onlined), | ||
TP_STRUCT__entry( | ||
__field(u64, available) | ||
__field(u64, committed) | ||
__field(unsigned long, vm_memory_committed) | ||
__field(unsigned long, pages_ballooned) | ||
__field(unsigned long, pages_added) | ||
__field(unsigned long, pages_onlined) | ||
), | ||
TP_fast_assign( | ||
__entry->available = available; | ||
__entry->committed = committed; | ||
__entry->vm_memory_committed = vm_memory_committed; | ||
__entry->pages_ballooned = pages_ballooned; | ||
__entry->pages_added = pages_added; | ||
__entry->pages_onlined = pages_onlined; | ||
), | ||
TP_printk("available %lld, committed %lld; vm_memory_committed %ld;" | ||
" pages_ballooned %ld, pages_added %ld, pages_onlined %ld", | ||
__entry->available, __entry->committed, | ||
__entry->vm_memory_committed, __entry->pages_ballooned, | ||
__entry->pages_added, __entry->pages_onlined | ||
) | ||
); | ||
|
||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH . | ||
#undef TRACE_INCLUDE_FILE | ||
#define TRACE_INCLUDE_FILE hv_trace_balloon | ||
#endif /* _HV_TRACE_BALLOON_H */ | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |