old_ctx.ctx = ctx->ctx;
/* only type that uses the union */
- if (ctx->ctx == LTTNG_KERNEL_CONTEXT_PERF_COUNTER) {
+ if (ctx->ctx == LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER) {
old_ctx.u.perf_counter.type =
ctx->u.perf_counter.type;
old_ctx.u.perf_counter.config =
{
return ioctl(fd, LTTNG_RING_BUFFER_GET_STREAM_ID, stream_id);
}
+
+/* Returns the current timestamp. */
+int kernctl_get_current_timestamp(int fd, uint64_t *ts)
+{
+ return ioctl(fd, LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP, ts);
+}