Merge tag 'trace-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Jul 2017 02:45:45 +0000 (19:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Jul 2017 02:45:45 +0000 (19:45 -0700)
Pull tracing updates from Steven Rostedt:
 "The new features of this release:

   - Added TRACE_DEFINE_SIZEOF() which allows trace events that use
     sizeof() it the TP_printk() to be converted to the actual size such
     that trace-cmd and perf can parse them correctly.

   - Some rework of the TRACE_DEFINE_ENUM() such that the above
     TRACE_DEFINE_SIZEOF() could reuse the same code.

   - Recording of tgid (Thread Group ID). This is similar to how task
     COMMs are recorded (cached at sched_switch), where it is in a table
     and used on output of the trace and trace_pipe files.

   - Have ":mod:<module>" be cached when written into set_ftrace_filter.
     Then the functions of the module will be traced at module load.

   - Some random clean ups and small fixes"

* tag 'trace-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (26 commits)
  ftrace: Test for NULL iter->tr in regex for stack_trace_filter changes
  ftrace: Decrement count for dyn_ftrace_total_info for init functions
  ftrace: Unlock hash mutex on failed allocation in process_mod_list()
  tracing: Add support for display of tgid in trace output
  tracing: Add support for recording tgid of tasks
  ftrace: Decrement count for dyn_ftrace_total_info file
  ftrace: Remove unused function ftrace_arch_read_dyn_info()
  sh/ftrace: Remove only user of ftrace_arch_read_dyn_info()
  ftrace: Have cached module filters be an active filter
  ftrace: Implement cached modules tracing on module load
  ftrace: Have the cached module list show in set_ftrace_filter
  ftrace: Add :mod: caching infrastructure to trace_array
  tracing: Show address when function names are not found
  ftrace: Add missing comment for FTRACE_OPS_FL_RCU
  tracing: Rename update the enum_map file
  tracing: Add TRACE_DEFINE_SIZEOF() macros
  tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values
  tracing: Rename enum_replace to eval_replace
  trace: rename enum_map functions
  trace: rename trace.c enum functions
  ...

1  2 
include/asm-generic/vmlinux.lds.h
kernel/module.c

                        VMLINUX_SYMBOL(__start_ftrace_events) = .;      \
                        KEEP(*(_ftrace_events))                         \
                        VMLINUX_SYMBOL(__stop_ftrace_events) = .;       \
-                       VMLINUX_SYMBOL(__start_ftrace_enum_maps) = .;   \
-                       KEEP(*(_ftrace_enum_map))                       \
-                       VMLINUX_SYMBOL(__stop_ftrace_enum_maps) = .;
+                       VMLINUX_SYMBOL(__start_ftrace_eval_maps) = .;   \
+                       KEEP(*(_ftrace_eval_map))                       \
+                       VMLINUX_SYMBOL(__stop_ftrace_eval_maps) = .;
  #else
  #define FTRACE_EVENTS()
  #endif
        KEEP(*(__##name##_of_table))                                    \
        KEEP(*(__##name##_of_table_end))
  
 -#define CLKSRC_OF_TABLES()    OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
 -#define CLKEVT_OF_TABLES()    OF_TABLE(CONFIG_CLKEVT_OF, clkevt)
 +#define TIMER_OF_TABLES()     OF_TABLE(CONFIG_TIMER_OF, timer)
  #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
  #define CLK_OF_TABLES()               OF_TABLE(CONFIG_COMMON_CLK, clk)
  #define IOMMU_OF_TABLES()     OF_TABLE(CONFIG_OF_IOMMU, iommu)
        MEM_DISCARD(init.rodata)                                        \
        CLK_OF_TABLES()                                                 \
        RESERVEDMEM_OF_TABLES()                                         \
 -      CLKSRC_OF_TABLES()                                              \
 -      CLKEVT_OF_TABLES()                                              \
 +      TIMER_OF_TABLES()                                               \
        IOMMU_OF_TABLES()                                               \
        CPU_METHOD_OF_TABLES()                                          \
        CPUIDLE_METHOD_OF_TABLES()                                      \
        KERNEL_DTB()                                                    \
        IRQCHIP_OF_MATCH_TABLE()                                        \
        ACPI_PROBE_TABLE(irqchip)                                       \
 -      ACPI_PROBE_TABLE(clksrc)                                        \
 +      ACPI_PROBE_TABLE(timer)                                         \
 +      ACPI_PROBE_TABLE(iort)                                          \
        EARLYCON_TABLE()
  
  #define INIT_TEXT                                                     \
diff --combined kernel/module.c
@@@ -1202,7 -1202,10 +1202,7 @@@ static ssize_t store_uevent(struct modu
                            struct module_kobject *mk,
                            const char *buffer, size_t count)
  {
 -      enum kobject_action action;
 -
 -      if (kobject_action_type(buffer, count, &action) == 0)
 -              kobject_uevent(&mk->kobj, action);
 +      kobject_synth_uevent(&mk->kobj, buffer, count);
        return count;
  }
  
@@@ -3074,9 -3077,9 +3074,9 @@@ static int find_module_sections(struct 
        mod->trace_events = section_objs(info, "_ftrace_events",
                                         sizeof(*mod->trace_events),
                                         &mod->num_trace_events);
-       mod->trace_enums = section_objs(info, "_ftrace_enum_map",
-                                       sizeof(*mod->trace_enums),
-                                       &mod->num_trace_enums);
+       mod->trace_evals = section_objs(info, "_ftrace_eval_map",
+                                       sizeof(*mod->trace_evals),
+                                       &mod->num_trace_evals);
  #endif
  #ifdef CONFIG_TRACING
        mod->trace_bprintk_fmt_start = section_objs(info, "__trace_printk_fmt",