diff options
| author | Tzvetomir Stoyanov <tstoyanov@vmware.com> | 2019-04-01 12:43:10 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-04-01 14:18:09 -0400 |
| commit | 489b34948cbbc725755e1b1125dbdb16401eea07 (patch) | |
| tree | 1f12a28b0e38cf452fbc7524d216bad4f29bc151 | |
| parent | 70df6a7311186a7ab0b19f481dee4ca540a73837 (diff) | |
tools lib traceevent: Change description of few APIs
APIs descriptions should describe the purpose of the function, its
parameters and return value. While working on man pages implementation,
I noticed mismatches in the descriptions of few APIs. This patch
changes the description of these APIs, making them consistent with the
man pages:
- tep_print_num_field()
- tep_print_func_field()
- tep_get_header_page_size()
- tep_get_long_size()
- tep_set_long_size()
- tep_get_page_size()
- tep_set_page_size()
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/linux-trace-devel/20190325145017.30246-2-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164343.396759247@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/lib/traceevent/event-parse-api.c | 20 | ||||
| -rw-r--r-- | tools/lib/traceevent/event-parse.c | 6 |
2 files changed, 14 insertions, 12 deletions
diff --git a/tools/lib/traceevent/event-parse-api.c b/tools/lib/traceevent/event-parse-api.c index d463761a58f4..3686a221e981 100644 --- a/tools/lib/traceevent/event-parse-api.c +++ b/tools/lib/traceevent/event-parse-api.c | |||
| @@ -43,8 +43,8 @@ int tep_get_events_count(struct tep_handle *tep) | |||
| 43 | * @flag: flag, or combination of flags to be set | 43 | * @flag: flag, or combination of flags to be set |
| 44 | * can be any combination from enum tep_flag | 44 | * can be any combination from enum tep_flag |
| 45 | * | 45 | * |
| 46 | * This sets a flag or mbination of flags from enum tep_flag | 46 | * This sets a flag or combination of flags from enum tep_flag |
| 47 | */ | 47 | */ |
| 48 | void tep_set_flag(struct tep_handle *tep, int flag) | 48 | void tep_set_flag(struct tep_handle *tep, int flag) |
| 49 | { | 49 | { |
| 50 | if(tep) | 50 | if(tep) |
| @@ -140,10 +140,10 @@ void tep_set_cpus(struct tep_handle *pevent, int cpus) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | /** | 142 | /** |
| 143 | * tep_get_long_size - get the size of a long integer on the current machine | 143 | * tep_get_long_size - get the size of a long integer on the traced machine |
| 144 | * @pevent: a handle to the tep_handle | 144 | * @pevent: a handle to the tep_handle |
| 145 | * | 145 | * |
| 146 | * This returns the size of a long integer on the current machine | 146 | * This returns the size of a long integer on the traced machine |
| 147 | * If @pevent is NULL, 0 is returned. | 147 | * If @pevent is NULL, 0 is returned. |
| 148 | */ | 148 | */ |
| 149 | int tep_get_long_size(struct tep_handle *pevent) | 149 | int tep_get_long_size(struct tep_handle *pevent) |
| @@ -154,11 +154,11 @@ int tep_get_long_size(struct tep_handle *pevent) | |||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | /** | 156 | /** |
| 157 | * tep_set_long_size - set the size of a long integer on the current machine | 157 | * tep_set_long_size - set the size of a long integer on the traced machine |
| 158 | * @pevent: a handle to the tep_handle | 158 | * @pevent: a handle to the tep_handle |
| 159 | * @size: size, in bytes, of a long integer | 159 | * @size: size, in bytes, of a long integer |
| 160 | * | 160 | * |
| 161 | * This sets the size of a long integer on the current machine | 161 | * This sets the size of a long integer on the traced machine |
| 162 | */ | 162 | */ |
| 163 | void tep_set_long_size(struct tep_handle *pevent, int long_size) | 163 | void tep_set_long_size(struct tep_handle *pevent, int long_size) |
| 164 | { | 164 | { |
| @@ -167,10 +167,10 @@ void tep_set_long_size(struct tep_handle *pevent, int long_size) | |||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | /** | 169 | /** |
| 170 | * tep_get_page_size - get the size of a memory page on the current machine | 170 | * tep_get_page_size - get the size of a memory page on the traced machine |
| 171 | * @pevent: a handle to the tep_handle | 171 | * @pevent: a handle to the tep_handle |
| 172 | * | 172 | * |
| 173 | * This returns the size of a memory page on the current machine | 173 | * This returns the size of a memory page on the traced machine |
| 174 | * If @pevent is NULL, 0 is returned. | 174 | * If @pevent is NULL, 0 is returned. |
| 175 | */ | 175 | */ |
| 176 | int tep_get_page_size(struct tep_handle *pevent) | 176 | int tep_get_page_size(struct tep_handle *pevent) |
| @@ -181,11 +181,11 @@ int tep_get_page_size(struct tep_handle *pevent) | |||
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | /** | 183 | /** |
| 184 | * tep_set_page_size - set the size of a memory page on the current machine | 184 | * tep_set_page_size - set the size of a memory page on the traced machine |
| 185 | * @pevent: a handle to the tep_handle | 185 | * @pevent: a handle to the tep_handle |
| 186 | * @_page_size: size of a memory page, in bytes | 186 | * @_page_size: size of a memory page, in bytes |
| 187 | * | 187 | * |
| 188 | * This sets the size of a memory page on the current machine | 188 | * This sets the size of a memory page on the traced machine |
| 189 | */ | 189 | */ |
| 190 | void tep_set_page_size(struct tep_handle *pevent, int _page_size) | 190 | void tep_set_page_size(struct tep_handle *pevent, int _page_size) |
| 191 | { | 191 | { |
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index c00aebab3c33..000ab7514be7 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
| @@ -6453,7 +6453,8 @@ int tep_get_any_field_val(struct trace_seq *s, struct tep_event *event, | |||
| 6453 | * @record: The record with the field name. | 6453 | * @record: The record with the field name. |
| 6454 | * @err: print default error if failed. | 6454 | * @err: print default error if failed. |
| 6455 | * | 6455 | * |
| 6456 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. | 6456 | * Returns positive value on success, negative in case of an error, |
| 6457 | * or 0 if buffer is full. | ||
| 6457 | */ | 6458 | */ |
| 6458 | int tep_print_num_field(struct trace_seq *s, const char *fmt, | 6459 | int tep_print_num_field(struct trace_seq *s, const char *fmt, |
| 6459 | struct tep_event *event, const char *name, | 6460 | struct tep_event *event, const char *name, |
| @@ -6485,7 +6486,8 @@ int tep_print_num_field(struct trace_seq *s, const char *fmt, | |||
| 6485 | * @record: The record with the field name. | 6486 | * @record: The record with the field name. |
| 6486 | * @err: print default error if failed. | 6487 | * @err: print default error if failed. |
| 6487 | * | 6488 | * |
| 6488 | * Returns: 0 on success, -1 field not found, or 1 if buffer is full. | 6489 | * Returns positive value on success, negative in case of an error, |
| 6490 | * or 0 if buffer is full. | ||
| 6489 | */ | 6491 | */ |
| 6490 | int tep_print_func_field(struct trace_seq *s, const char *fmt, | 6492 | int tep_print_func_field(struct trace_seq *s, const char *fmt, |
| 6491 | struct tep_event *event, const char *name, | 6493 | struct tep_event *event, const char *name, |
