Commit d6a326d6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'trace-assign-str-v6.10' of...

Merge tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing cleanup from Steven Rostedt:
 "Remove second argument of __assign_str()

  The __assign_str() macro logic of the TRACE_EVENT() macro was
  optimized so that it no longer needs the second argument. The
  __assign_str() is always matched with __string() field that takes a
  field name and the source for that field:

    __string(field, source)

  The TRACE_EVENT() macro logic will save off the source value and then
  use that value to copy into the ring buffer via the __assign_str().

  Before commit c1fa617c ("tracing: Rework __assign_str() and
  __string() to not duplicate getting the string"), the __assign_str()
  needed the second argument which would perform the same logic as the
  __string() source parameter did. Not only would this add overhead, but
  it was error prone as if the __assign_str() source produced something
  different, it may not have allocated enough for the string in the ring
  buffer (as the __string() source was used to determine how much to
  allocate)

  Now that the __assign_str() just uses the same string that was used in
  __string() it no longer needs the source parameter. It can now be
  removed"

* tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/treewide: Remove second parameter of __assign_str()
parents bca2a25d 2c92ca84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ TRACE_EVENT(instruction_emulation,
	),

	TP_fast_assign(
		__assign_str(instr, instr);
		__assign_str(instr);
		__entry->addr = addr;
	),

+2 −2
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ TRACE_EVENT(rtas_input,

	TP_fast_assign(
		__entry->nargs = be32_to_cpu(rtas_args->nargs);
		__assign_str(name, name);
		__assign_str(name);
		be32_to_cpu_array(__get_dynamic_array(inputs), rtas_args->args, __entry->nargs);
	),

@@ -162,7 +162,7 @@ TRACE_EVENT(rtas_output,
	TP_fast_assign(
		__entry->nr_other = be32_to_cpu(rtas_args->nret) - 1;
		__entry->status = be32_to_cpu(rtas_args->rets[0]);
		__assign_str(name, name);
		__assign_str(name);
		be32_to_cpu_array(__get_dynamic_array(other_outputs),
				  &rtas_args->rets[1], __entry->nr_other);
	),
+1 −1
Original line number Diff line number Diff line
@@ -1678,7 +1678,7 @@ TRACE_EVENT(kvm_nested_vmenter_failed,
	),

	TP_fast_assign(
		__assign_str(msg, msg);
		__assign_str(msg);
		__entry->err = err;
	),

+9 −9
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ DECLARE_EVENT_CLASS(regmap_reg,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
		__entry->reg = reg;
		__entry->val = val;
	),
@@ -74,7 +74,7 @@ DECLARE_EVENT_CLASS(regmap_bulk,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
		__entry->reg = reg;
		__entry->val_len = val_len;
		memcpy(__get_dynamic_array(buf), val, val_len);
@@ -113,7 +113,7 @@ DECLARE_EVENT_CLASS(regmap_block,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
		__entry->reg = reg;
		__entry->count = count;
	),
@@ -163,9 +163,9 @@ TRACE_EVENT(regcache_sync,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(status, status);
		__assign_str(type, type);
		__assign_str(name);
		__assign_str(status);
		__assign_str(type);
	),

	TP_printk("%s type=%s status=%s", __get_str(name),
@@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(regmap_bool,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
		__entry->flag = flag;
	),

@@ -216,7 +216,7 @@ DECLARE_EVENT_CLASS(regmap_async,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
	),

	TP_printk("%s", __get_str(name))
@@ -264,7 +264,7 @@ TRACE_EVENT(regcache_drop_region,
	),

	TP_fast_assign(
		__assign_str(name, regmap_name(map));
		__assign_str(name);
		__entry->from = from;
		__entry->to = to;
	),
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ DECLARE_EVENT_CLASS(devres,
		__field(size_t, size)
	),
	TP_fast_assign(
		__assign_str(devname, dev_name(dev));
		__assign_str(devname);
		__entry->op = op;
		__entry->node = node;
		__entry->name = name;
Loading