Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191224
b: refs/heads/master
c: 7ca5989
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Arnaldo Carvalho de Melo committed Apr 14, 2010
1 parent 8a4253c commit fe72231
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02b95dadc8a1d2c302513e5fa24c492380d26e93
refs/heads/master: 7ca5989dd065cbc48a958666c273794686ea7525
4 changes: 0 additions & 4 deletions trunk/tools/perf/builtin-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "util/debug.h"
#include "util/debugfs.h"
#include "util/parse-options.h"
#include "util/parse-events.h" /* For debugfs_path */
#include "util/probe-finder.h"
#include "util/probe-event.h"

Expand Down Expand Up @@ -205,9 +204,6 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used)
!params.show_lines))
usage_with_options(probe_usage, options);

if (debugfs_valid_mountpoint(debugfs_path) < 0)
die("Failed to find debugfs path.");

if (params.list_events) {
if (params.nevents != 0 || params.dellist) {
pr_err(" Error: Don't use --list with --add/--del.\n");
Expand Down
12 changes: 10 additions & 2 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#include "color.h"
#include "symbol.h"
#include "thread.h"
#include "debugfs.h"
#include "trace-event.h" /* For __unused */
#include "parse-events.h" /* For debugfs_path */
#include "probe-event.h"
#include "probe-finder.h"

Expand Down Expand Up @@ -1075,10 +1075,18 @@ void clear_kprobe_trace_event(struct kprobe_trace_event *tev)
static int open_kprobe_events(bool readwrite)
{
char buf[PATH_MAX];
const char *__debugfs;
int ret;

ret = e_snprintf(buf, PATH_MAX, "%s/../kprobe_events", debugfs_path);
__debugfs = debugfs_find_mountpoint();
if (__debugfs == NULL) {
pr_warning("Debugfs is not mounted.\n");
return -ENOENT;
}

ret = e_snprintf(buf, PATH_MAX, "%stracing/kprobe_events", __debugfs);
if (ret >= 0) {
pr_debug("Opening %s write=%d\n", buf, readwrite);
if (readwrite && !probe_event_dry_run)
ret = open(buf, O_RDWR, O_APPEND);
else
Expand Down

0 comments on commit fe72231

Please sign in to comment.