File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed
Documentation/admin-guide Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 6743
6743
the same thing would happen if it was left off). The irq_handler_entry
6744
6744
event, and all events under the "initcall" system.
6745
6745
6746
+ Flags can be added to the instance to modify its behavior when it is
6747
+ created. The flags are separated by '^'. Currently there's only one flag
6748
+ defined, and that's "traceoff", to have the tracing instance tracing
6749
+ disabled after it is created.
6750
+
6751
+ trace_instance=foo^traceoff,sched,irq
6752
+
6753
+ The flags must come before the defined events.
6754
+
6746
6755
If memory has been reserved (see memmap for x86), the instance
6747
6756
can use that memory:
6748
6757
6765
6774
kernel versions where the validator will fail and reset the ring buffer
6766
6775
if the layout is not the same as the previous kernel.
6767
6776
6777
+ If the ring buffer is used for persistent bootups and has events enabled,
6778
+ it is recommend to disable tracing so that events from a previous boot do not
6779
+ mix with events of the current boot (unless you are debugging a random crash
6780
+ at boot up).
6781
+
6782
+ reserve_mem=12M:4096:trace trace_instance=boot_map^traceoff@trace,sched,irq
6783
+
6784
+
6768
6785
trace_options=[option-list]
6769
6786
[FTRACE] Enable or disable tracer options at boot.
6770
6787
The option-list is a comma delimited list of options
Original file line number Diff line number Diff line change @@ -10468,10 +10468,36 @@ __init static void enable_instances(void)
10468
10468
phys_addr_t start = 0 ;
10469
10469
phys_addr_t size = 0 ;
10470
10470
unsigned long addr = 0 ;
10471
+ bool traceoff = false;
10472
+ char * flag_delim ;
10473
+ char * addr_delim ;
10471
10474
10472
10475
tok = strsep (& curr_str , "," );
10473
- name = strsep (& tok , "@" );
10474
10476
10477
+ flag_delim = strchr (tok , '^' );
10478
+ addr_delim = strchr (tok , '@' );
10479
+
10480
+ if (addr_delim )
10481
+ * addr_delim ++ = '\0' ;
10482
+
10483
+ if (flag_delim )
10484
+ * flag_delim ++ = '\0' ;
10485
+
10486
+ name = tok ;
10487
+
10488
+ if (flag_delim ) {
10489
+ char * flag ;
10490
+
10491
+ while ((flag = strsep (& flag_delim , "^" ))) {
10492
+ if (strcmp (flag , "traceoff" ) == 0 )
10493
+ traceoff = true;
10494
+ else
10495
+ pr_info ("Tracing: Invalid instance flag '%s' for %s\n" ,
10496
+ flag , name );
10497
+ }
10498
+ }
10499
+
10500
+ tok = addr_delim ;
10475
10501
if (tok && isdigit (* tok )) {
10476
10502
start = memparse (tok , & tok );
10477
10503
if (!start ) {
@@ -10519,6 +10545,9 @@ __init static void enable_instances(void)
10519
10545
continue ;
10520
10546
}
10521
10547
10548
+ if (traceoff )
10549
+ tracer_tracing_off (tr );
10550
+
10522
10551
/* Only allow non mapped buffers to be deleted */
10523
10552
if (!start )
10524
10553
trace_array_put (tr );
You can’t perform that action at this time.
0 commit comments