Skip to content

Commit

Permalink
tracing: Remove leftover FTRACE_ENABLE/DISABLE_MCOUNT enums
Browse files Browse the repository at this point in the history
The enums for FTRACE_ENABLE_MCOUNT and FTRACE_DISABLE_MCOUNT were
used as commands to ftrace_run_update_code(). But these commands
were used by the old nasty ftrace daemon that has long been slain.

This is a clean up patch to remove the references to these enums
and simplify the code a little.

Reported-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 15, 2010
1 parent b304d04 commit 79e406d
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,10 +884,8 @@ enum {
FTRACE_ENABLE_CALLS = (1 << 0),
FTRACE_DISABLE_CALLS = (1 << 1),
FTRACE_UPDATE_TRACE_FUNC = (1 << 2),
FTRACE_ENABLE_MCOUNT = (1 << 3),
FTRACE_DISABLE_MCOUNT = (1 << 4),
FTRACE_START_FUNC_RET = (1 << 5),
FTRACE_STOP_FUNC_RET = (1 << 6),
FTRACE_START_FUNC_RET = (1 << 3),
FTRACE_STOP_FUNC_RET = (1 << 4),
};

static int ftrace_filtered;
Expand Down Expand Up @@ -1226,32 +1224,24 @@ static void ftrace_shutdown(int command)

static void ftrace_startup_sysctl(void)
{
int command = FTRACE_ENABLE_MCOUNT;

if (unlikely(ftrace_disabled))
return;

/* Force update next time */
saved_ftrace_func = NULL;
/* ftrace_start_up is true if we want ftrace running */
if (ftrace_start_up)
command |= FTRACE_ENABLE_CALLS;

ftrace_run_update_code(command);
ftrace_run_update_code(FTRACE_ENABLE_CALLS);
}

static void ftrace_shutdown_sysctl(void)
{
int command = FTRACE_DISABLE_MCOUNT;

if (unlikely(ftrace_disabled))
return;

/* ftrace_start_up is true if ftrace is running */
if (ftrace_start_up)
command |= FTRACE_DISABLE_CALLS;

ftrace_run_update_code(command);
ftrace_run_update_code(FTRACE_DISABLE_CALLS);
}

static cycle_t ftrace_update_time;
Expand Down

0 comments on commit 79e406d

Please sign in to comment.