forked from torvalds/linux
-
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.
Merge tag 'trace-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/g…
…it/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "New tracing features: - The ring buffer is no longer disabled when reading the trace file. The trace_pipe file was made to be used for live tracing and reading as it acted like the normal producer/consumer. As the trace file would not consume the data, the easy way of handling it was to just disable writes to the ring buffer. This came to a surprise to the BPF folks who complained about lost events due to reading. This is no longer an issue. If someone wants to keep the old disabling there's a new option "pause-on-trace" that can be set. - New set_ftrace_notrace_pid file. PIDs in this file will not be traced by the function tracer. Similar to set_ftrace_pid, which makes the function tracer only trace those tasks with PIDs in the file, the set_ftrace_notrace_pid does the reverse. - New set_event_notrace_pid file. PIDs in this file will cause events not to be traced if triggered by a task with a matching PID. Similar to the set_event_pid file but will not be traced. Note, sched_waking and sched_switch events may still be traced if one of the tasks referenced by those events contains a PID that is allowed to be traced. Tracing related features: - New bootconfig option, that is attached to the initrd file. If bootconfig is on the command line, then the initrd file is searched looking for a bootconfig appended at the end. - New GPU tracepoint infrastructure to help the gfx drivers to get off debugfs (acked by Greg Kroah-Hartman) And other minor updates and fixes" * tag 'trace-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (27 commits) tracing: Do not allocate buffer in trace_find_next_entry() in atomic tracing: Add documentation on set_ftrace_notrace_pid and set_event_notrace_pid selftests/ftrace: Add test to test new set_event_notrace_pid file selftests/ftrace: Add test to test new set_ftrace_notrace_pid file tracing: Create set_event_notrace_pid to not trace tasks ftrace: Create set_ftrace_notrace_pid to not trace tasks ftrace: Make function trace pid filtering a bit more exact ftrace/kprobe: Show the maxactive number on kprobe_events tracing: Have the document reflect that the trace file keeps tracing enabled ring-buffer/tracing: Have iterator acknowledge dropped events tracing: Do not disable tracing when reading the trace file ring-buffer: Do not disable recording when there is an iterator ring-buffer: Make resize disable per cpu buffer instead of total buffer ring-buffer: Optimize rb_iter_head_event() ring-buffer: Do not die if rb_iter_peek() fails more than thrice ring-buffer: Have rb_iter_head_event() handle concurrent writer ring-buffer: Add page_stamp to iterator for synchronization ring-buffer: Rename ring_buffer_read() to read_buffer_iter_advance() ring-buffer: Have ring_buffer_empty() not depend on tracing stopped tracing: Save off entry when peeking at next entry ...
- Loading branch information
Showing
28 changed files
with
1,194 additions
and
256 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
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,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
|
||
config TRACE_GPU_MEM | ||
bool |
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,3 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
obj-$(CONFIG_TRACE_GPU_MEM) += trace_gpu_mem.o |
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,13 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* GPU memory trace points | ||
* | ||
* Copyright (C) 2020 Google, Inc. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
|
||
#define CREATE_TRACE_POINTS | ||
#include <trace/events/gpu_mem.h> | ||
|
||
EXPORT_TRACEPOINT_SYMBOL(gpu_mem_total); |
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
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,57 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* GPU memory trace points | ||
* | ||
* Copyright (C) 2020 Google, Inc. | ||
*/ | ||
|
||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM gpu_mem | ||
|
||
#if !defined(_TRACE_GPU_MEM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_GPU_MEM_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
/* | ||
* The gpu_memory_total event indicates that there's an update to either the | ||
* global or process total gpu memory counters. | ||
* | ||
* This event should be emitted whenever the kernel device driver allocates, | ||
* frees, imports, unimports memory in the GPU addressable space. | ||
* | ||
* @gpu_id: This is the gpu id. | ||
* | ||
* @pid: Put 0 for global total, while positive pid for process total. | ||
* | ||
* @size: Virtual size of the allocation in bytes. | ||
* | ||
*/ | ||
TRACE_EVENT(gpu_mem_total, | ||
|
||
TP_PROTO(uint32_t gpu_id, uint32_t pid, uint64_t size), | ||
|
||
TP_ARGS(gpu_id, pid, size), | ||
|
||
TP_STRUCT__entry( | ||
__field(uint32_t, gpu_id) | ||
__field(uint32_t, pid) | ||
__field(uint64_t, size) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->gpu_id = gpu_id; | ||
__entry->pid = pid; | ||
__entry->size = size; | ||
), | ||
|
||
TP_printk("gpu_id=%u pid=%u size=%llu", | ||
__entry->gpu_id, | ||
__entry->pid, | ||
__entry->size) | ||
); | ||
|
||
#endif /* _TRACE_GPU_MEM_H */ | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
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
Oops, something went wrong.