Code cleanup in contexts
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
AppliedMerged into master, thanks!
Mathieu
Quoted 90 lines · ----- On Mar 14, 2019, at 12:31 PM, Michael Jeanson [email protected] wrote:
Signed-off-by Michael Jeanson <[email protected]>---
liblttng-ust/lttng-context-cpu-id.c | 5 +---- liblttng-ust/lttng-context-perf-counters.c | 5 +---- liblttng-ust/lttng-context-procname.c | 10 ++-------- liblttng-ust/lttng-context-pthread-id.c | 5 +---- 4 files changed, 5 insertions(+), 20 deletions(-)liblttng-ust/lttng-context-cpu-id.c +1
-4@@ -61,10 +61,7 @@ staticvoid cpu_id_get_value (struct lttng_ctx_field *field,struct lttng_ctx_value *value) { -int cpu; - - cpu =lttng_ust_get_cpu (); - value->u.s64 = cpu; + value->u.s64 =lttng_ust_get_cpu (); }int lttng_add_cpu_id_to_ctx (struct lttng_ctx **ctx)liblttng-ust/lttng-context-perf-counters.c +1
-4@@ -367,10 +367,7 @@ staticvoid perf_counter_get_value (struct lttng_ctx_field *field,struct lttng_ctx_value *value) { -uint64_t v; - - v =wrapper_perf_counter_read (field); - value->u.s64 = v; + value->u.s64 =wrapper_perf_counter_read (field); }/* Called with UST lock held */ liblttng-ust/lttng-context-procname.c +0
-0@@ -78,10 +78,7 @@ void lttng_context_procname_reset(void)static
size_tprocname_get_size(struct lttng_ctx_field *field, size_t offset){liblttng-ust/lttng-context-procname.c +1
-4-size_t size =0 ; - - size +=LTTNG_UST_PROCNAME_LEN ; -return size; +return LTTNG_UST_PROCNAME_LEN ;}
static
liblttng-ust/lttng-context-procname.c +1
-4@@ -99,10 +96,7 @@ staticvoid procname_get_value (struct lttng_ctx_field *field,struct lttng_ctx_value *value) { -char *procname; - - procname =wrapper_getprocname (); - value->u.str = procname; + value->u.str =wrapper_getprocname (); }int lttng_add_procname_to_ctx (struct lttng_ctx **ctx)liblttng-ust/lttng-context-pthread-id.c +1
-5@@ -52,10 +52,7 @@ staticvoid pthread_id_get_value (struct lttng_ctx_field *field,struct lttng_ctx_value *value) { -unsigned long pthread_id; - - pthread_id = (unsigned long )pthread_self (); - value->u.s64 = pthread_id; + value->u.s64 = (unsigned long )pthread_self (); }int lttng_add_pthread_id_to_ctx (struct lttng_ctx **ctx) --2.17.1
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com