diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-23 12:28:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-23 12:28:01 -0700 |
commit | d6a326d694e77fd1d90ae40ad3c73a6af0eb1b8d (patch) | |
tree | 65620f42b46c745e16298f31b45d54b33ec0ebea /drivers/iommu | |
parent | bca2a25d3be779fbdf912de8e1ded6dcd483845d (diff) | |
parent | 2c92ca849fcc6ee7d0c358e9959abc9f58661aea (diff) | |
download | linux-d6a326d694e77fd1d90ae40ad3c73a6af0eb1b8d.tar.gz linux-d6a326d694e77fd1d90ae40ad3c73a6af0eb1b8d.tar.bz2 linux-d6a326d694e77fd1d90ae40ad3c73a6af0eb1b8d.zip |
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 c1fa617caeb0 ("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()
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel/trace.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/iommu/intel/trace.h b/drivers/iommu/intel/trace.h index 961ac1c1bc21..9defdae6ebae 100644 --- a/drivers/iommu/intel/trace.h +++ b/drivers/iommu/intel/trace.h @@ -32,7 +32,7 @@ TRACE_EVENT(qi_submit, ), TP_fast_assign( - __assign_str(iommu, iommu->name); + __assign_str(iommu); __entry->qw0 = qw0; __entry->qw1 = qw1; __entry->qw2 = qw2; @@ -79,8 +79,8 @@ TRACE_EVENT(prq_report, __entry->dw2 = dw2; __entry->dw3 = dw3; __entry->seq = seq; - __assign_str(iommu, iommu->name); - __assign_str(dev, dev_name(dev)); + __assign_str(iommu); + __assign_str(dev); ), TP_printk("%s/%s seq# %ld: %s", @@ -102,8 +102,8 @@ DECLARE_EVENT_CLASS(cache_tag_log, __field(u32, users) ), TP_fast_assign( - __assign_str(iommu, tag->iommu->name); - __assign_str(dev, dev_name(tag->dev)); + __assign_str(iommu); + __assign_str(dev); __entry->type = tag->type; __entry->domain_id = tag->domain_id; __entry->pasid = tag->pasid; @@ -152,8 +152,8 @@ DECLARE_EVENT_CLASS(cache_tag_flush, __field(unsigned long, mask) ), TP_fast_assign( - __assign_str(iommu, tag->iommu->name); - __assign_str(dev, dev_name(tag->dev)); + __assign_str(iommu); + __assign_str(dev); __entry->type = tag->type; __entry->domain_id = tag->domain_id; __entry->pasid = tag->pasid; |