X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=0116e84a0fcf05f02606140619e181f09a2b5d1b;hp=68753286fb81c336e5026eb0eb64411ebbd5a81f;hb=df0f840ba686e3fe670c9906fd46330fff65da07;hpb=76d7553fcee76da7c103c3b51a6b01f46cd784c8 diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 68753286f..0116e84a0 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -91,7 +91,7 @@ struct ltt_kernel_session *trace_kernel_create_session(char *path) /* Allocate a new ltt kernel session */ lks = zmalloc(sizeof(struct ltt_kernel_session)); if (lks == NULL) { - perror("create kernel session zmalloc"); + PERROR("create kernel session zmalloc"); goto error; } @@ -107,7 +107,7 @@ struct ltt_kernel_session *trace_kernel_create_session(char *path) /* Set session path */ ret = asprintf(&lks->trace_path, "%s/kernel", path); if (ret < 0) { - perror("asprintf kernel traces path"); + PERROR("asprintf kernel traces path"); goto error; } @@ -129,13 +129,13 @@ struct ltt_kernel_channel *trace_kernel_create_channel(struct lttng_channel *cha lkc = zmalloc(sizeof(struct ltt_kernel_channel)); if (lkc == NULL) { - perror("ltt_kernel_channel zmalloc"); + PERROR("ltt_kernel_channel zmalloc"); goto error; } lkc->channel = zmalloc(sizeof(struct lttng_channel)); if (lkc->channel == NULL) { - perror("lttng_channel zmalloc"); + PERROR("lttng_channel zmalloc"); goto error; } memcpy(lkc->channel, chan, sizeof(struct lttng_channel)); @@ -151,7 +151,7 @@ struct ltt_kernel_channel *trace_kernel_create_channel(struct lttng_channel *cha /* Set default trace output path */ ret = asprintf(&lkc->pathname, "%s", path); if (ret < 0) { - perror("asprintf kernel create channel"); + PERROR("asprintf kernel create channel"); goto error; } @@ -174,7 +174,7 @@ struct ltt_kernel_event *trace_kernel_create_event(struct lttng_event *ev) lke = zmalloc(sizeof(struct ltt_kernel_event)); attr = zmalloc(sizeof(struct lttng_kernel_event)); if (lke == NULL || attr == NULL) { - perror("kernel event zmalloc"); + PERROR("kernel event zmalloc"); goto error; } @@ -246,7 +246,7 @@ struct ltt_kernel_metadata *trace_kernel_create_metadata(char *path) lkm = zmalloc(sizeof(struct ltt_kernel_metadata)); chan = zmalloc(sizeof(struct lttng_channel)); if (lkm == NULL || chan == NULL) { - perror("kernel metadata zmalloc"); + PERROR("kernel metadata zmalloc"); goto error; } @@ -264,7 +264,7 @@ struct ltt_kernel_metadata *trace_kernel_create_metadata(char *path) /* Set default metadata path */ ret = asprintf(&lkm->pathname, "%s/metadata", path); if (ret < 0) { - perror("asprintf kernel metadata"); + PERROR("asprintf kernel metadata"); goto error; } @@ -286,7 +286,7 @@ struct ltt_kernel_stream *trace_kernel_create_stream(void) lks = zmalloc(sizeof(struct ltt_kernel_stream)); if (lks == NULL) { - perror("kernel stream zmalloc"); + PERROR("kernel stream zmalloc"); goto error; }