tracing: Updates for 5.7
Subsystems (7)
Steven Rostedt
maintainercover tracing: Updates for 5.7
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: bbd9d05618a6d608c72640b1d3d651a75913456a
Masami Hiramatsu (2):
bootconfig: Support O=<builddir> option tools/bootconfig: Show line and column in parse error
Steven Rostedt (VMware) (2):
tracing: Have hwlat ts be first instance and record count of instances
tracing: Remove unused TRACE_BUFFER bits
Yiwei Zhang (1):
gpu/trace: add a gpu total memory usage tracepoint
----
Documentation/trace/ftrace.rst | 32 ++++++++++++++------- drivers/Kconfig | 2 ++ drivers/gpu/Makefile | 1 + drivers/gpu/trace/Kconfig | 4 +++ drivers/gpu/trace/Makefile | 3 ++ drivers/gpu/trace/trace_gpu_mem.c | 13 +++++++++ include/linux/bootconfig.h | 3 +- include/trace/events/gpu_mem.h | 57 +++++++++++++++++++++++++++++++++++++ init/main.c | 14 ++++++--- kernel/trace/trace.h | 7 +---- kernel/trace/trace_entries.h | 4 ++- kernel/trace/trace_hwlat.c | 24 +++++++++++----- kernel/trace/trace_output.c | 4 +-- lib/bootconfig.c | 35 +++++++++++++++++------ tools/bootconfig/Makefile | 27 +++++++++++------- tools/bootconfig/main.c | 35 ++++++++++++++++++++--- tools/bootconfig/test-bootconfig.sh | 14 ++++++--- 17 files changed, 221 insertions(+), 58 deletions(-) create mode 100644 drivers/gpu/trace/Kconfig create mode 100644 drivers/gpu/trace/Makefile create mode 100644 drivers/gpu/trace/trace_gpu_mem.c create mode 100644 include/trace/events/gpu_mem.h
Steven Rostedt
maintainerPATCH 1/5 tracing: Have hwlat ts be first instance and record count of instances
From: "Steven Rostedt (VMware)" <[email protected]>
The hwlat tracer runs a loop of width time during a given window. It then reports the max latency over a given threshold and records a timestamp. But this timestamp is the time after the width has finished, and not the time it actually triggered.
Record the actual time when the latency was greater than the threshold as well as the number of times it was greater in a given width per window.
--- Documentation/trace/ftrace.rst | 32 ++++++++++++++++++++++---------- kernel/trace/trace_entries.h | 4 +++- kernel/trace/trace_hwlat.c | 24 +++++++++++++++++------- kernel/trace/trace_output.c | 4 ++-- 4 files changed, 44 insertions(+), 20 deletions(-)
Documentation/trace/ftrace.rst +22 -10
@@ -2126,6 +2126,8 @@ periodically make a CPU constantly busy with interrupts disabled. # cat trace # tracer: hwlat # + # entries-in-buffer/entries-written: 13/13 #P:8 + # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq
@@ -2133,12 +2135,18 @@ periodically make a CPU constantly busy with interrupts disabled. # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | - <...>-3638 [001] d... 19452.055471: #1 inner/outer(us): 12/14 ts:1499801089.066141940 - <...>-3638 [003] d... 19454.071354: #2 inner/outer(us): 11/9 ts:1499801091.082164365 - <...>-3638 [002] dn.. 19461.126852: #3 inner/outer(us): 12/9 ts:1499801098.138150062 - <...>-3638 [001] d... 19488.340960: #4 inner/outer(us): 8/12 ts:1499801125.354139633 - <...>-3638 [003] d... 19494.388553: #5 inner/outer(us): 8/12 ts:1499801131.402150961 - <...>-3638 [003] d... 19501.283419: #6 inner/outer(us): 0/12 ts:1499801138.297435289 nmi-total:4 nmi-count:1 + <...>-1729 [001] d... 678.473449: #1 inner/outer(us): 11/12 ts:1581527483.343962693 count:6 + <...>-1729 [004] d... 689.556542: #2 inner/outer(us): 16/9 ts:1581527494.889008092 count:1 + <...>-1729 [005] d... 714.756290: #3 inner/outer(us): 16/16 ts:1581527519.678961629 count:5 + <...>-1729 [001] d... 718.788247: #4 inner/outer(us): 9/17 ts:1581527523.889012713 count:1 + <...>-1729 [002] d... 719.796341: #5 inner/outer(us): 13/9 ts:1581527524.912872606 count:1 + <...>-1729 [006] d... 844.787091: #6 inner/outer(us): 9/12 ts:1581527649.889048502 count:2 + <...>-1729 [003] d... 849.827033: #7 inner/outer(us): 18/9 ts:1581527654.889013793 count:1 + <...>-1729 [007] d... 853.859002: #8 inner/outer(us): 9/12 ts:1581527658.889065736 count:1 + <...>-1729 [001] d... 855.874978: #9 inner/outer(us): 9/11 ts:1581527660.861991877 count:1 + <...>-1729 [001] d... 863.938932: #10 inner/outer(us): 9/11 ts:1581527668.970010500 count:1 nmi-total:7 nmi-count:1 + <...>-1729 [007] d... 878.050780: #11 inner/outer(us): 9/12 ts:1581527683.385002600 count:1 nmi-total:5 nmi-count:1 + <...>-1729 [007] d... 886.114702: #12 inner/outer(us): 9/12 ts:1581527691.385001600 count:1 The above output is somewhat the same in the header. All events will have
@@ -2148,7 +2156,7 @@ interrupts disabled 'd'. Under the FUNCTION title there is: This is the count of events recorded that were greater than the tracing_threshold (See below). - inner/outer(us): 12/14 + inner/outer(us): 11/11 This shows two numbers as "inner latency" and "outer latency". The test runs in a loop checking a timestamp twice. The latency detected within
@@ -2156,11 +2164,15 @@ interrupts disabled 'd'. Under the FUNCTION title there is: after the previous timestamp and the next timestamp in the loop is the "outer latency". - ts:1499801089.066141940 + ts:1581527483.343962693 + + The absolute timestamp that the first latency was recorded in the window. + + count:6 - The absolute timestamp that the event happened. + The number of times a latency was detected during the window. - nmi-total:4 nmi-count:1 + nmi-total:7 nmi-count:1 On architectures that support it, if an NMI comes in during the test, the time spent in NMI is reported in "nmi-total" (in
kernel/trace/trace_entries.h +3 -1
@@ -325,14 +325,16 @@ FTRACE_ENTRY(hwlat, hwlat_entry, __field_desc( long, timestamp, tv_nsec ) __field( unsigned int, nmi_count ) __field( unsigned int, seqnum ) + __field( unsigned int, count ) ), - F_printk("cnt:%u\tts:%010llu.%010lu\tinner:%llu\touter:%llu\tnmi-ts:%llu\tnmi-count:%u\n", + F_printk("cnt:%u\tts:%010llu.%010lu\tinner:%llu\touter:%llu\tcount:%d\tnmi-ts:%llu\tnmi-count:%u\n", __entry->seqnum, __entry->tv_sec, __entry->tv_nsec, __entry->duration, __entry->outer_duration, + __entry->count, __entry->nmi_total_ts, __entry->nmi_count) );
kernel/trace/trace_hwlat.c +17 -7
@@ -83,6 +83,7 @@ struct hwlat_sample {u64 nmi_total_ts;/* Total time spent in NMIs */ struct timespec64 timestamp;/* wall time */ int nmi_count;/* # NMIs during this sample */ +int count;/* # of iteratons over threash */ };/* keep the global state somewhere. */
@@ -124,6 +125,7 @@ static void trace_hwlat_sample(struct hwlat_sample *sample) entry->timestamp = sample->timestamp; entry->nmi_total_ts = sample->nmi_total_ts; entry->nmi_count = sample->nmi_count; + entry->count = sample->count;if (!call_filter_check_discard (call, entry, buffer, event))trace_buffer_unlock_commit_nostack (buffer, event);
@@ -167,12 +169,14 @@ void trace_hwlat_callback(bool enter)static int get_sample (void ) {struct trace_array *tr = hwlat_trace; +struct hwlat_sample s;time_type start, t1, t2, last_t2; -s64 diff, total, last_total =0 ; +s64 diff, outer_diff, total, last_total =0 ;u64 sample =0 ;u64 thresh = tracing_thresh;u64 outer_sample =0 ;int ret =-1 ; +unsigned int count =0 ;do_div (thresh,NSEC_PER_USEC );/* modifies interval value */
@@ -186,6 +190,7 @@ static int get_sample(void)init_time (last_t2,0 ); start =time_get ();/* start timestamp */ + outer_diff =0 ; do {
@@ -194,14 +199,14 @@ static int get_sample(void)if (time_u64 (last_t2)) {/* Check the delta from outer loop (t2 to next t1) */ - diff =time_to_us (time_sub (t1, last_t2)); + outer_diff =time_to_us (time_sub (t1, last_t2));/* This shouldn't happen */ -if (diff <0 ) { +if (outer_diff <0 ) {pr_err (BANNER "time running backwards\n" ); goto out; } -if (diff > outer_sample) - outer_sample = diff; +if (outer_diff > outer_sample) + outer_sample = outer_diff; } last_t2 = t2;
@@ -217,6 +222,12 @@ static int get_sample(void)/* This checks the inner loop (t1 to t2) */ diff =time_to_us (time_sub (t2, t1));/* current diff */ +if (diff > thresh || outer_diff > thresh) { +if (!count) +ktime_get_real_ts64 (&s.timestamp); + count++; + } +/* This shouldn't happen */ if (diff <0 ) {pr_err (BANNER "time running backwards\n" );
@@ -236,7 +247,6 @@ static int get_sample(void)/* If we exceed the threshold value, we have found a hardware latency */ if (sample > thresh || outer_sample > thresh) { -struct hwlat_sample s;u64 latency; ret =1 ;
@@ -249,9 +259,9 @@ static int get_sample(void) s.seqnum = hwlat_data.count; s.duration = sample; s.outer_duration = outer_sample; -ktime_get_real_ts64 (&s.timestamp); s.nmi_total_ts = nmi_total_ts; s.nmi_count = nmi_count; + s.count = count;trace_hwlat_sample (&s); latency =max (sample, outer_sample);
kernel/trace/trace_output.c +2 -2
@@ -1158,12 +1158,12 @@ trace_hwlat_print(struct trace_iterator *iter, int flags,trace_assign_type (field, entry); -trace_seq_printf (s,"#%-5u inner/outer(us): %4llu/%-5llu ts:%lld.%09ld" , +trace_seq_printf (s,"#%-5u inner/outer(us): %4llu/%-5llu ts:%lld.%09ld count:%d" , field->seqnum, field->duration, field->outer_duration, (long long )field->timestamp.tv_sec, - field->timestamp.tv_nsec); + field->timestamp.tv_nsec, field->count);if (field->nmi_count) {/*
Signature · 1 line
2.25.1
Steven Rostedt
maintainerPATCH 2/5 tracing: Remove unused TRACE_BUFFER bits
In reply to Steven RostedtFrom: "Steven Rostedt (VMware)" <[email protected]>
Commit 567cd4da54ff ("ring-buffer: User context bit recursion checking") added the TRACE_BUFFER bits to be used in the current task's trace_recursion field. But the final submission of the logic removed the use of those bits, but never removed the bits themselves (they were never used in upstream Linux). These can be safely removed.
--- kernel/trace/trace.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
kernel/trace/trace.h +1 -6
@@ -557,12 +557,7 @@ struct tracer {* caller, and we can skip the current check. */ enum { -TRACE_BUFFER_BIT , -TRACE_BUFFER_NMI_BIT , -TRACE_BUFFER_IRQ_BIT , -TRACE_BUFFER_SIRQ_BIT , - -/* Start of function recursion bits */ +/* Function recursion bits */ TRACE_FTRACE_BIT ,TRACE_FTRACE_NMI_BIT ,TRACE_FTRACE_IRQ_BIT ,
Signature · 1 line
2.25.1
Steven Rostedt
maintainerPATCH 3/5 bootconfig: Support O=<builddir> option
In reply to Steven RostedtFrom: Masami Hiramatsu <[email protected]>
Support O=<builddir> option to build bootconfig tool in the other directory. As same as other tools, if you specify O=<builddir>, bootconfig command is build under <builddir>.
--- tools/bootconfig/Makefile | 27 +++++++++++++++++---------- tools/bootconfig/test-bootconfig.sh | 14 ++++++++++---- 2 files changed, 27 insertions(+), 14 deletions(-)
tools/bootconfig/Makefile +17 -10
@@ -1,23 +1,30 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for bootconfig command +include ../scripts/Makefile.include bindir ?= /usr/bin -HEADER = include/linux/bootconfig.h -CFLAGS = -Wall -g -I./include +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +endif -PROGS = bootconfig +LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h +CFLAGS = -Wall -g -I$(CURDIR)/include -all: $(PROGS) +ALL_TARGETS := bootconfig +ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) -bootconfig: ../../lib/bootconfig.c main.c $(HEADER) +all: $(ALL_PROGRAMS) + +$(OUTPUT)bootconfig: main.c $(LIBSRC) $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ -install: $(PROGS) - install bootconfig $(DESTDIR)$(bindir) +test: $(ALL_PROGRAMS) test-bootconfig.sh + ./test-bootconfig.sh $(OUTPUT) -test: bootconfig - ./test-bootconfig.sh +install: $(ALL_PROGRAMS) + install $(OUTPUT)bootconfig $(DESTDIR)$(bindir) clean: - $(RM) -f *.o bootconfig + $(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS)
tools/bootconfig/test-bootconfig.sh +10 -4
@@ -3,9 +3,16 @@ echo "Boot config test script" -BOOTCONF=./bootconfig -INITRD=`mktemp initrd-XXXX` -TEMPCONF=`mktemp temp-XXXX.bconf` +if [ -d "$1" ]; then + TESTDIR=$1 +else + TESTDIR=. +fi +BOOTCONF=${TESTDIR}/bootconfig + +INITRD=`mktemp ${TESTDIR}/initrd-XXXX` +TEMPCONF=`mktemp ${TESTDIR}/temp-XXXX.bconf` +OUTFILE=`mktemp ${TESTDIR}/tempout-XXXX` NG=0 cleanup() {
@@ -65,7 +72,6 @@ new_size=$(stat -c %s $INITRD) xpass test $new_size -eq $initrd_size echo "No error messge while applying" -OUTFILE=`mktemp tempout-XXXX` dd if=/dev/zero of=$INITRD bs=4096 count=1 printf " \0\0\0 \0\0\0" >> $INITRD $BOOTCONF -a $TEMPCONF $INITRD > $OUTFILE 2>&1
Signature · 1 line
2.25.1
Steven Rostedt
maintainerPATCH 4/5 tools/bootconfig: Show line and column in parse error
In reply to Steven RostedtFrom: Masami Hiramatsu <[email protected]>
Show line and column when we got a parse error in bootconfig tool. Current lib/bootconfig shows the parse error with byte offset, but that is not human readable.
This makes xbc_init() not showing error message itself but able to pass the error message and position to caller, so that the caller can decode it and show the error message with line number and columns.
With this patch, bootconfig tool shows an error with line:column as below.
$ cat samples/bad-dotword.bconf
# do not start keyword with .
key {
.word = 1
}
$ ./bootconfig -a samples/bad-dotword.bconf initrd
Parse Error: Invalid keyword at 3:3--- include/linux/bootconfig.h | 3 ++- init/main.c | 14 ++++++++++---- lib/bootconfig.c | 35 ++++++++++++++++++++++++++--------- tools/bootconfig/main.c | 35 +++++++++++++++++++++++++++++++---- 4 files changed, 69 insertions(+), 18 deletions(-)
include/linux/bootconfig.h +2 -1
@@ -216,7 +216,8 @@ static inline int __init xbc_node_compose_key(struct xbc_node *node, }/* XBC node initializer */ -int __init xbc_init (char *buf); +int __init xbc_init (char *buf,const char **emsg,int *epos); +/* XBC cleanup data structures */ void __init xbc_destroy_all (void );
init/main.c +10 -4
@@ -353,6 +353,8 @@ static int __init bootconfig_params(char *param, char *val,static void __init setup_boot_config (const char *cmdline) {static char tmp_cmdline[COMMAND_LINE_SIZE ]__initdata ; +const char *msg; +int pos;u32 size, csum;char *data, *copy;u32 *hdr;
@@ -400,10 +402,14 @@ static void __init setup_boot_config(const char *cmdline)memcpy (copy, data, size); copy[size] ='\0' ; - ret =xbc_init (copy); -if (ret <0 ) -pr_err ("Failed to parse bootconfig\n" ); -else { + ret =xbc_init (copy, &msg, &pos); +if (ret <0 ) { +if (pos <0 ) +pr_err ("Failed to init bootconfig: %s.\n" , msg); +else +pr_err ("Failed to parse bootconfig: %s at %d.\n" , + msg, pos); + }else {pr_info ("Load bootconfig: %d bytes %d nodes\n" , size, ret);/* keys starting with "kernel." are passed via cmdline */ extra_command_line =xbc_make_cmdline ("kernel" );
lib/bootconfig.c +26 -9
@@ -29,12 +29,14 @@ static int xbc_node_num __initdata;static char *xbc_data__initdata ;static size_t xbc_data_size__initdata ;static struct xbc_node *last_parent__initdata ; +static const char *xbc_err_msg__initdata ; +static int xbc_err_pos__initdata ;static int __init xbc_parse_error (const char *msg,const char *p) { -int pos = p - xbc_data; + xbc_err_msg = msg; + xbc_err_pos = (int )(p - xbc_data); -pr_err ("Parse error at pos %d: %s\n" , pos, msg);return -EINVAL ; }
@@ -738,33 +740,44 @@ void __init xbc_destroy_all(void)/** * xbc_init() - Parse given XBC file and build XBC internal tree * @buf: boot config text +* @emsg: A pointer of const char * to store the error message +* @epos: A pointer of int to store the error position * * This parses the boot config text in @buf. @buf must be a * null terminated string and smaller than XBC_DATA_MAX. * Return the number of stored nodes (>0) if succeeded, or -errno * if there is any error. +* In error cases, @emsg will be updated with an error message and +* @epos will be updated with the error position which is the byte offset +* of @buf. If the error is not a parser error, @epos will be -1. */ -int __init xbc_init (char *buf) +int __init xbc_init (char *buf,const char **emsg,int *epos) {char *p, *q;int ret, c; +if (epos) + *epos =-1 ; +if (xbc_data) { -pr_err ("Error: bootconfig is already initialized.\n" ); +if (emsg) + *emsg ="Bootconfig is already initialized" ;return -EBUSY ; } ret =strlen (buf);if (ret >XBC_DATA_MAX -1 || ret ==0 ) { -pr_err ("Error: Config data is %s.\n" , - ret ?"too big" :"empty" ); +if (emsg) + *emsg = ret ?"Config data is too big" : +"Config data is empty" ;return -ERANGE ; } xbc_nodes =memblock_alloc (sizeof (struct xbc_node ) *XBC_NODE_MAX ,SMP_CACHE_BYTES );if (!xbc_nodes) { -pr_err ("Failed to allocate memory for bootconfig nodes.\n" ); +if (emsg) + *emsg ="Failed to allocate bootconfig nodes" ;return -ENOMEM ; }memset (xbc_nodes,0 ,sizeof (struct xbc_node ) *XBC_NODE_MAX );
@@ -814,9 +827,13 @@ int __init xbc_init(char *buf)if (!ret) ret =xbc_verify_tree (); -if (ret <0 ) +if (ret <0 ) { +if (epos) + *epos = xbc_err_pos; +if (emsg) + *emsg = xbc_err_msg;xbc_destroy_all (); -else + }else ret = xbc_node_num;return ret;
tools/bootconfig/main.c +31 -4
@@ -130,6 +130,7 @@ int load_xbc_from_initrd(int fd, char **buf)int ret;u32 size =0 , csum =0 , rcsum;char magic[BOOTCONFIG_MAGIC_LEN ]; +const char *msg; ret =fstat (fd, &stat);if (ret <0 )
@@ -182,10 +183,12 @@ int load_xbc_from_initrd(int fd, char **buf)return -EINVAL ; } - ret =xbc_init (*buf); + ret =xbc_init (*buf, &msg,NULL );/* Wrong data */ -if (ret <0 ) +if (ret <0 ) { +pr_err ("parse error: %s.\n" , msg);return ret; + }return size; }
@@ -244,11 +247,34 @@ int delete_xbc(const char *path)return ret; } +static void show_xbc_error (const char *data,const char *msg,int pos) +{ +int lin =1 , col, i; + +if (pos <0 ) { +pr_err ("Error: %s.\n" , msg); +return ; + } + +/* Note that pos starts from 0 but lin and col should start from 1. */ + col = pos +1 ; +for (i =0 ; i < pos; i++) { +if (data[i] =='\n' ) { + lin++; + col = pos - i; + } + } +pr_err ("Parse Error: %s at %d:%d\n" , msg, lin, col); + +} +int apply_xbc (const char *path,const char *xbc_path) {u32 size, csum;char *buf, *data;int ret, fd; +const char *msg; +int pos; ret =load_xbc_file (xbc_path, &buf);if (ret <0 ) {
@@ -267,11 +293,12 @@ int apply_xbc(const char *path, const char *xbc_path) *(u32 *)(data + size +4 ) = csum;/* Check the data format */ - ret =xbc_init (buf); + ret =xbc_init (buf, &msg, &pos);if (ret <0 ) { -pr_err ("Failed to parse %s: %d\n" , xbc_path, ret); +show_xbc_error (data, msg, pos);free (data);free (buf); +return ret; }printf ("Apply %s to %s\n" , xbc_path, path);
Signature · 1 line
2.25.1
Steven Rostedt
maintainerPATCH 5/5 gpu/trace: add a gpu total memory usage tracepoint
In reply to Steven RostedtFrom: Yiwei Zhang <[email protected]>
This change adds the below gpu memory tracepoint:
gpu_mem/gpu_mem_total: track global or proc gpu memory total usages
Per process tracking of total gpu memory usage in the gem layer is not appropriate and hard to implement with trivial overhead. So for the gfx device driver layer to track total gpu memory usage both globally and per process in an easy and uniform way is to integrate the tracepoint in this patch to the underlying varied implementations of gpu memory tracking system from vendors.
Putting this tracepoint in the common trace events can not only help wean the gfx drivers off of debugfs but also greatly help the downstream Android gpu vendors because debugfs is to be deprecated in the upcoming Android release. Then the gpu memory tracking of both Android kernel and the upstream linux kernel can stay closely, which can benefit the whole kernel eco-system in the long term.
--- drivers/Kconfig | 2 ++ drivers/gpu/Makefile | 1 + drivers/gpu/trace/Kconfig | 4 +++ drivers/gpu/trace/Makefile | 3 ++ drivers/gpu/trace/trace_gpu_mem.c | 13 +++++++ include/trace/events/gpu_mem.h | 57 +++++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 drivers/gpu/trace/Kconfig create mode 100644 drivers/gpu/trace/Makefile create mode 100644 drivers/gpu/trace/trace_gpu_mem.c create mode 100644 include/trace/events/gpu_mem.h
drivers/Kconfig +2 -0
@@ -200,6 +200,8 @@ source "drivers/thunderbolt/Kconfig" source "drivers/android/Kconfig" +source "drivers/gpu/trace/Kconfig" + source "drivers/nvdimm/Kconfig" source "drivers/dax/Kconfig"
drivers/gpu/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_TEGRA_HOST1X) += host1x/ obj-y += drm/ vga/ obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/ +obj-$(CONFIG_TRACE_GPU_MEM) += trace/
drivers/gpu/trace/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config TRACE_GPU_MEM + bool
drivers/gpu/trace/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_TRACE_GPU_MEM) += trace_gpu_mem.o
drivers/gpu/trace/trace_gpu_mem.c new file +13 -0
@@ -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);
include/trace/events/gpu_mem.h new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
2.25.1