<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_events_hist.c, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-23T03:52:09Z</updated>
<entry>
<title>tracing: Have the historgram use the result of str_has_prefix() for len of prefix</title>
<updated>2018-12-23T03:52:09Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-12-21T23:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=036876fa56204ae0fa59045bd6bbb2691a060633'/>
<id>urn:sha1:036876fa56204ae0fa59045bd6bbb2691a060633</id>
<content type='text'>
As str_has_prefix() returns the length on match, we can use that for the
updating of the string pointer instead of recalculating the prefix size.

Cc: Tom Zanussi  &lt;zanussi@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use str_has_prefix() instead of using fixed sizes</title>
<updated>2018-12-23T03:51:54Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-12-20T18:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6b2735514bcd70ad1556a33892a636b20ece671'/>
<id>urn:sha1:b6b2735514bcd70ad1556a33892a636b20ece671</id>
<content type='text'>
There are several instances of strncmp(str, "const", 123), where 123 is the
strlen of the const string to check if "const" is the prefix of str. But
this can be error prone. Use str_has_prefix() instead.

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use str_has_prefix() helper for histogram code</title>
<updated>2018-12-23T03:51:01Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-12-20T03:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=754481e6954cbef53f8bc4412ad48dde611e21d3'/>
<id>urn:sha1:754481e6954cbef53f8bc4412ad48dde611e21d3</id>
<content type='text'>
The tracing histogram code contains a lot of instances of the construct:

 strncmp(str, "const", sizeof("const") - 1)

This can be prone to bugs due to typos or bad cut and paste. Use the
str_has_prefix() helper macro instead that removes the need for having two
copies of the constant string.

Cc: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add hist trigger comments for variable-related fields</title>
<updated>2018-12-22T13:21:05Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05ddb25cb31491b0901d057c40ad50d01b3db783'/>
<id>urn:sha1:05ddb25cb31491b0901d057c40ad50d01b3db783</id>
<content type='text'>
Add a few comments to help clarify how variable and variable reference
fields are used in the code.

Link: http://lkml.kernel.org/r/ea857ce948531d7bec712bbb0f38360aa1d378ec.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Remove hist trigger synth_var_refs</title>
<updated>2018-12-22T13:21:05Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=912201345f7c39e6b0ac283207be2b6641fa47b9'/>
<id>urn:sha1:912201345f7c39e6b0ac283207be2b6641fa47b9</id>
<content type='text'>
All var_refs are now handled uniformly and there's no reason to treat
the synth_refs in a special way now, so remove them and associated
functions.

Link: http://lkml.kernel.org/r/b4d3470526b8f0426dcec125399dad9ad9b8589d.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use hist trigger's var_ref array to destroy var_refs</title>
<updated>2018-12-22T13:21:05Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=656fe2ba85e81d00e4447bf77b8da2be3c47acb2'/>
<id>urn:sha1:656fe2ba85e81d00e4447bf77b8da2be3c47acb2</id>
<content type='text'>
Since every var ref for a trigger has an entry in the var_ref[] array,
use that to destroy the var_refs, instead of piecemeal via the field
expressions.

This allows us to avoid having to keep and treat differently separate
lists for the action-related references, which future patches will
remove.

Link: http://lkml.kernel.org/r/fad1a164f0e257c158e70d6eadbf6c586e04b2a2.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Remove open-coding of hist trigger var_ref management</title>
<updated>2018-12-22T13:21:04Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de40f033d4e84e843d6a12266e3869015ea9097c'/>
<id>urn:sha1:de40f033d4e84e843d6a12266e3869015ea9097c</id>
<content type='text'>
Have create_var_ref() manage the hist trigger's var_ref list, rather
than having similar code doing it in multiple places.  This cleans up
the code and makes sure var_refs are always accounted properly.

Also, document the var_ref-related functions to make what their
purpose clearer.

Link: http://lkml.kernel.org/r/05ddae93ff514e66fc03897d6665231892939913.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Use var_refs[] for hist trigger reference checking</title>
<updated>2018-12-22T13:21:04Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2018-12-19T19:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4f6d245031e04bdd12db390298acec0474a1a46'/>
<id>urn:sha1:e4f6d245031e04bdd12db390298acec0474a1a46</id>
<content type='text'>
Since all the variable reference hist_fields are collected into
hist_data-&gt;var_refs[] array, there's no need to go through all the
fields looking for them, or in separate arrays like synth_var_refs[],
which will be going away soon anyway.

This also allows us to get rid of some unnecessary code and functions
currently used for the same purpose.

Link: http://lkml.kernel.org/r/1545246556.4239.7.camel@gmail.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Change strlen to sizeof for hist trigger static strings</title>
<updated>2018-12-22T13:21:04Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2f31ed9308cc9e95c149078b276a47360ab507bb'/>
<id>urn:sha1:2f31ed9308cc9e95c149078b276a47360ab507bb</id>
<content type='text'>
There's no need to use strlen() for static strings when the length is
already known, so update trace_events_hist.c with sizeof() for those
cases.

Link: http://lkml.kernel.org/r/e3e754f2bd18e56eaa8baf79bee619316ebf4cfc.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Remove unnecessary hist trigger struct field</title>
<updated>2018-12-22T13:21:03Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2018-12-18T20:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6801f0d5ca00bed159c7f87870cc6f5411837544'/>
<id>urn:sha1:6801f0d5ca00bed159c7f87870cc6f5411837544</id>
<content type='text'>
hist_field.var_idx is completely unused, so remove it.

Link: http://lkml.kernel.org/r/d4e066c0f509f5f13ad3babc8c33ca6e7ddc439a.1545161087.git.tom.zanussi@linux.intel.com

Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
