From patchwork Tue Nov 7 15:31:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 835345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Tlnk9MfK"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yWYQQ4wknz9t2M for ; Wed, 8 Nov 2017 02:34:53 +1100 (AEDT) Received: from localhost ([::1]:54008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5tq-0008HZ-RM for incoming@patchwork.ozlabs.org; Tue, 07 Nov 2017 10:34:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5tF-0008Fv-6Z for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC5tA-0007vw-7d for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:13 -0500 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:51903) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eC5tA-0007vX-1V for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:08 -0500 Received: by mail-pf0-x244.google.com with SMTP id n14so10571281pfh.8 for ; Tue, 07 Nov 2017 07:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dA+V+al4HqRQlV7rLr+0cHW6/213m2GU4GsdP8d67hA=; b=Tlnk9MfKEUpZVu7O1gcHBnablxs/zTCeI+BUQlm2d/2aQALpV9DtuEd7cjZXqr0PXp NvzyZSeTcXlPqy/BGvWXH5aaehrl8993wcePcxuYygqYJ+O8KVh8v7wG/294OZboahWv ozVRmpxoyoxo39vjJ9LnNJOJO1heYUi98jv0V2NWUyssk4XYE/cpdMcLudY9hsx7CGJu /qqd3lL7ZUt+esz6aYa6gFxGJngcFofIDh/Nh5WjIlbEBuluwJW7qujM4gJWVdQSdQ/c CbYHqwNdXxt5/l9HTG/HieoVzr8gP0QmNbrtpqbIgl2go1d+K/r7gYzJirIcoyEYifhx uZ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dA+V+al4HqRQlV7rLr+0cHW6/213m2GU4GsdP8d67hA=; b=n/Bapy5Tcn81BT7jKKqJl73HX1hQ2hk8z5ZnAo3HuzsUjco9H7rWlv6itkQIrRT+b7 Y0bfPtUE0dJ9/1PwJx4dcNcfindduzQNrTk8gNJ4b8Zt1MDodLwN3tYR+EExYVXhVyv/ ZwFhqW+jejNChlckJhzTBbnqYbvWD1ZfH6UFx3h1SfZBsC6+wdrtcvD0WbR3Rgi0ca+l oggiiqFPOlK71kgWplGVxNmGQBRvuQ1eQwCjg+aUbCQIjgLtRPgSFmm4RM1R5QoeduxS CUbEj93lOo22tMspFpwsL7+Gdfw4FFfZCMT8RsRL9nwn5Sb6I97GfYEZszMP0u9L4EHK tVDQ== X-Gm-Message-State: AMCzsaVu9iNQF0E+NZwa4qPCvyQ9QLXP3PjZrkAzcsIANYrXcHvmHFbZ wqwD0osuyZUWuIvzhpH5O2A= X-Google-Smtp-Source: ABhQp+Szk2BQq4QGxuB14Xq8ax8BWLpcA61EV2jQyPuaEjdyUPTSgq0ka8IH8NuMX9jJDSBEEnHpmg== X-Received: by 10.99.179.74 with SMTP id x10mr18868762pgt.336.1510068846295; Tue, 07 Nov 2017 07:34:06 -0800 (PST) Received: from danjae.aot.lge.com ([59.12.60.183]) by smtp.gmail.com with ESMTPSA id z13sm3416330pgc.29.2017.11.07.07.34.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 07:34:05 -0800 (PST) From: Namhyung Kim To: Stefan Hajnoczi Date: Wed, 8 Nov 2017 00:31:34 +0900 Message-Id: <20171107153136.19426-1-namhyung@gmail.com> X-Mailer: git-send-email 2.14.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH 1/3] trace: Simplify find_debugfs() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The return vale of find_debugfs() is 1 if it could find a mount point of debugfs. It can be saved in the while loop instead of checking it again. Signed-off-by: Namhyung Kim --- trace/ftrace.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/trace/ftrace.c b/trace/ftrace.c index 7de104deba..bfa38e71f0 100644 --- a/trace/ftrace.c +++ b/trace/ftrace.c @@ -19,6 +19,7 @@ static int find_debugfs(char *debugfs) { char type[100]; FILE *fp; + int ret = 0; fp = fopen("/proc/mounts", "r"); if (fp == NULL) { @@ -28,15 +29,13 @@ static int find_debugfs(char *debugfs) while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n", debugfs, type) == 2) { if (strcmp(type, "debugfs") == 0) { + ret = 1; break; } } fclose(fp); - if (strcmp(type, "debugfs") != 0) { - return 0; - } - return 1; + return ret; } bool ftrace_init(void) From patchwork Tue Nov 7 15:31:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 835350 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SHJ/wrfP"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yWYTR5X5Dz9s7c for ; Wed, 8 Nov 2017 02:37:31 +1100 (AEDT) Received: from localhost ([::1]:54027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5wP-0001ow-Nl for incoming@patchwork.ozlabs.org; Tue, 07 Nov 2017 10:37:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5tG-0008Gm-Sl for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC5tB-0007wX-5G for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:14 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:49336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eC5tB-0007w9-04 for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:09 -0500 Received: by mail-pg0-x243.google.com with SMTP id g6so11308338pgn.6 for ; Tue, 07 Nov 2017 07:34:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MX9fcn6tdHKyiCq0S4kLz5EQJ4cpghHZhR8ZebojkCs=; b=SHJ/wrfP4GR/YtJibFO0gIEjjhC/Fwhrx7IhIME1uKm/D0svBU9QQkVJ8NMJ7XQQpJ wjRD7HbLZHc8+w4ohnIpoxpslvgZjt45FQ9DUQkk17vQKBccwj3zjCetC5n3KDutyqzX 9TF2UbDqhJ6wrvUpiZVIrnO3/Ve83fKsEvmpCJyShlgudfef1qk5Mz9gy1T24L95L4Il 47jfEk2Pg7LjtXXgSN7+QkWiuI0ogG6676U/gE9GJEX35cckIlLrVaP7TosAvmRHM0xx /eSvDgIcgJV8pIVkJhNEr6Gnu/fTCziWs3vxp7dF+BBVoe9FbT42xgLF+LhLfErQ28vS 6BHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MX9fcn6tdHKyiCq0S4kLz5EQJ4cpghHZhR8ZebojkCs=; b=sNuR2qdalzQOsFUt1ewIoFz+J8we3aaoRXenpo2Y46RcOKlMxW5OhZJyztf/yKXySS YI6gVwR7SEWaHCzvEMV9XEutDusBVF19DPXR/yYIA2+eh4+q0MAe5Hb8/Uv8SAn0aRmV cWryiFzkTU5OvZbp53aVwlnuxloS3J/lHMdbypSC/HDRgxys6wIwOfTZDmOhbHoCECwH TPIB5AWE9sY18Gfrr8JJINRLCU7W9fFrceyZLMN8BD/Y45mfFBjvk1a8PVMmCdYpHn// Fz2lf1e4oIuBL5H89lkM86b8E+H5srTbMx+rdJpcDDcdShXCtcKctpQOK/I4KbH6YgeI AxaA== X-Gm-Message-State: AMCzsaV6yEqSN17MFUDPZO6e/Egawy2qy406MkU+4uqMe0GFrGF4sVVK RuiEvtz17L0MYIP9wuX0bpJChQ== X-Google-Smtp-Source: ABhQp+SPPvie/wb8hV+5hrHC4TlAem9NFJc9tozUDro+KUQ/V3n/2Kcp+ULmgsALTrgQ66OnJCm+tQ== X-Received: by 10.99.104.6 with SMTP id d6mr19016247pgc.319.1510068848068; Tue, 07 Nov 2017 07:34:08 -0800 (PST) Received: from danjae.aot.lge.com ([59.12.60.183]) by smtp.gmail.com with ESMTPSA id z13sm3416330pgc.29.2017.11.07.07.34.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 07:34:07 -0800 (PST) From: Namhyung Kim To: Stefan Hajnoczi Date: Wed, 8 Nov 2017 00:31:35 +0900 Message-Id: <20171107153136.19426-2-namhyung@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171107153136.19426-1-namhyung@gmail.com> References: <20171107153136.19426-1-namhyung@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH 2/3] trace: Generalize searching for debugfs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The find_debugfs() can be shared to find a different filesystem like tracefs. So make it more general and rename to find_mount(). Signed-off-by: Namhyung Kim --- trace/ftrace.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/trace/ftrace.c b/trace/ftrace.c index bfa38e71f0..213cb2205f 100644 --- a/trace/ftrace.c +++ b/trace/ftrace.c @@ -15,7 +15,7 @@ int trace_marker_fd; -static int find_debugfs(char *debugfs) +static int find_mount(char *mount_point, const char *fstype) { char type[100]; FILE *fp; @@ -27,8 +27,8 @@ static int find_debugfs(char *debugfs) } while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n", - debugfs, type) == 2) { - if (strcmp(type, "debugfs") == 0) { + mount_point, type) == 2) { + if (strcmp(type, fstype) == 0) { ret = 1; break; } @@ -40,14 +40,14 @@ static int find_debugfs(char *debugfs) bool ftrace_init(void) { - char debugfs[PATH_MAX]; + char mount_point[PATH_MAX]; char path[PATH_MAX]; int debugfs_found; int trace_fd = -1; - debugfs_found = find_debugfs(debugfs); + debugfs_found = find_mount(mount_point, "debugfs"); if (debugfs_found) { - snprintf(path, PATH_MAX, "%s/tracing/tracing_on", debugfs); + snprintf(path, PATH_MAX, "%s/tracing/tracing_on", mount_point); trace_fd = open(path, O_WRONLY); if (trace_fd < 0) { if (errno == EACCES) { @@ -66,7 +66,7 @@ bool ftrace_init(void) } close(trace_fd); } - snprintf(path, PATH_MAX, "%s/tracing/trace_marker", debugfs); + snprintf(path, PATH_MAX, "%s/tracing/trace_marker", mount_point); trace_marker_fd = open(path, O_WRONLY); if (trace_marker_fd < 0) { perror("Could not open ftrace 'trace_marker' file"); From patchwork Tue Nov 7 15:31:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 835346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gwvA1AlJ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yWYQS4FDgz9t2M for ; Wed, 8 Nov 2017 02:34:56 +1100 (AEDT) Received: from localhost ([::1]:54009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5tu-0008JS-KC for incoming@patchwork.ozlabs.org; Tue, 07 Nov 2017 10:34:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5tF-0008Fw-6l for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC5tC-0007xF-Mz for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:13 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:52494) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eC5tC-0007x4-HS for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:34:10 -0500 Received: by mail-pg0-x243.google.com with SMTP id a192so11303697pge.9 for ; Tue, 07 Nov 2017 07:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3XccuJqKje1x1+fm7bObmVQEIh0bUkQGiYQzPpVMILk=; b=gwvA1AlJhWuIYHjHJflGbIs7xUBJ9QtAFiFQJdNNpEiMxOdcBytM3gVDzEN7BcT0El bUrlfNi7BkZYTCnJkccIUE/AZPhUkK7iiX9pYwaKWnMAKcG13YPCWfbUH8/YXzSWnQ2r gF6LKC/GRrMeJP+3SPrYC0Hzk+IZhNxKqON8prAMh8kNSKwTYyC0b3vjwLwVf4j0sQNG iy8QFjJRfccpUnDf0EwsKEjD+rbCzgzx8iIeJc5x0vtScuPrBSrBERW7MwqVaAGNs90K jvShzWvcy2aGZtKIrLKautdrsf6DldimbZPultdoJvY8fJMOOXk59iOaaNPFDIoixoKk Qnrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3XccuJqKje1x1+fm7bObmVQEIh0bUkQGiYQzPpVMILk=; b=GSmpPHd7BnpghAZkpKBsXpimriSKShzHQIsTbp3IErzlSfvAP0EYbJECVtymSzOEhH 69qhMbuSHMJTPqy08VbEWwX8+91zvN1UUpqhGl+EEBodNcknQe5WMLbADOc+QC5O3H/j LYZ2aEce1lSyGZCYxD6KpbSv7/pcPy7fKarPo3HgncV0bvXRyqBTLWqD/TflHoJUqtTV odA5ABlluQgCP/1tPa66l4Gt1t0XTK0PVkVgecfR7WlXKsFErXU+ENZVd9XHK4qKqHOm M74vpBpkaF3h0QTq46xlWwvrElll7Wu8JcLavWKPjeYir41U54d48GzRFhn3qj9e1mwN 1dkA== X-Gm-Message-State: AMCzsaX62ZsUJQsZ3vhKK+AC5ZXdfkhEdYqwFDJZbCsbWsPlig+fIMB3 /vBpzdSjPgy2E9ZpcVBIV2Nk+w== X-Google-Smtp-Source: ABhQp+RN+2/YNx4CHeQhpKcBp03SsvOm5aEZ1KQRHwogmlR5k7WxILqCcO4Q/oXPZDu52krqaN1QOg== X-Received: by 10.99.112.29 with SMTP id l29mr18972615pgc.2.1510068849695; Tue, 07 Nov 2017 07:34:09 -0800 (PST) Received: from danjae.aot.lge.com ([59.12.60.183]) by smtp.gmail.com with ESMTPSA id z13sm3416330pgc.29.2017.11.07.07.34.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 07:34:09 -0800 (PST) From: Namhyung Kim To: Stefan Hajnoczi Date: Wed, 8 Nov 2017 00:31:36 +0900 Message-Id: <20171107153136.19426-3-namhyung@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171107153136.19426-1-namhyung@gmail.com> References: <20171107153136.19426-1-namhyung@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH 3/3] trace: Try using tracefs first X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Recent Linux kernel provides separate tracefs which doesn't need to be mounted on the debugfs. Although most systems mount it at the traditional place on the debugfs, it'd be safer to check tracefs first. Signed-off-by: Namhyung Kim --- trace/ftrace.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/trace/ftrace.c b/trace/ftrace.c index 213cb2205f..61692a8682 100644 --- a/trace/ftrace.c +++ b/trace/ftrace.c @@ -42,12 +42,18 @@ bool ftrace_init(void) { char mount_point[PATH_MAX]; char path[PATH_MAX]; - int debugfs_found; + int tracefs_found; int trace_fd = -1; + const char *subdir = ""; - debugfs_found = find_mount(mount_point, "debugfs"); - if (debugfs_found) { - snprintf(path, PATH_MAX, "%s/tracing/tracing_on", mount_point); + tracefs_found = find_mount(mount_point, "tracefs"); + if (!tracefs_found) { + tracefs_found = find_mount(mount_point, "debugfs"); + subdir = "/tracing"; + } + + if (tracefs_found) { + snprintf(path, PATH_MAX, "%s%s/tracing_on", mount_point, subdir); trace_fd = open(path, O_WRONLY); if (trace_fd < 0) { if (errno == EACCES) { @@ -66,14 +72,14 @@ bool ftrace_init(void) } close(trace_fd); } - snprintf(path, PATH_MAX, "%s/tracing/trace_marker", mount_point); + snprintf(path, PATH_MAX, "%s%s/trace_marker", mount_point, subdir); trace_marker_fd = open(path, O_WRONLY); if (trace_marker_fd < 0) { perror("Could not open ftrace 'trace_marker' file"); return false; } } else { - fprintf(stderr, "debugfs is not mounted\n"); + fprintf(stderr, "tracefs is not mounted\n"); return false; }