Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200608
b: refs/heads/master
c: a8fb260
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jun 11, 2010
1 parent fef3d55 commit 04d8331
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 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: 1d90f2e707e75afdb6b644f774cf5e54dc9c33fc
refs/heads/master: a8fb2608053547bc3152ea61a5ec7cdfce5d942c
4 changes: 3 additions & 1 deletion trunk/kernel/trace/trace_event_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ int perf_trace_init(struct perf_event *p_event)
mutex_lock(&event_mutex);
list_for_each_entry(tp_event, &ftrace_events, list) {
if (tp_event->event.type == event_id &&
tp_event->class && tp_event->class->perf_probe &&
tp_event->class &&
(tp_event->class->perf_probe ||
tp_event->class->reg) &&
try_module_get(tp_event->mod)) {
ret = perf_trace_event_init(tp_event, p_event);
break;
Expand Down
15 changes: 2 additions & 13 deletions trunk/tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)

if (self != NULL) {
int cols;

if (use_browser <= 0)
return self;
newtGetScreenSize(&cols, NULL);
cols -= 4;
newtCenteredWindow(cols, 1, title);
Expand All @@ -70,22 +67,14 @@ struct ui_progress *ui_progress__new(const char *title, u64 total)

void ui_progress__update(struct ui_progress *self, u64 curr)
{
/*
* FIXME: We should have a per UI backend way of showing progress,
* stdio will just show a percentage as NN%, etc.
*/
if (use_browser <= 0)
return;
newtScaleSet(self->scale, curr);
newtRefresh();
}

void ui_progress__delete(struct ui_progress *self)
{
if (use_browser > 0) {
newtFormDestroy(self->form);
newtPopWindow();
}
newtFormDestroy(self->form);
newtPopWindow();
free(self);
}

Expand Down

0 comments on commit 04d8331

Please sign in to comment.