Skip to content

Commit

Permalink
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/acme/linux-2.6 into perf/core
  • Loading branch information
Ingo Molnar committed Aug 6, 2010
2 parents a7c55cb + 71e7cf3 commit e66b688
Show file tree
Hide file tree
Showing 9 changed files with 297 additions and 40 deletions.
31 changes: 29 additions & 2 deletions tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,18 @@ static int __cmd_report(void)
hists__tty_browse_tree(&session->hists_tree, help);

out_delete:
perf_session__delete(session);
/*
* Speed up the exit process, for large files this can
* take quite a while.
*
* XXX Enable this when using valgrind or if we ever
* librarize this command.
*
* Also experiment with obstacks to see how much speed
* up we'll get here.
*
* perf_session__delete(session);
*/
return ret;
}

Expand Down Expand Up @@ -478,8 +489,24 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
* so don't allocate extra space that won't be used in the stdio
* implementation.
*/
if (use_browser > 0)
if (use_browser > 0) {
symbol_conf.priv_size = sizeof(struct sym_priv);
/*
* For searching by name on the "Browse map details".
* providing it only in verbose mode not to bloat too
* much struct symbol.
*/
if (verbose) {
/*
* XXX: Need to provide a less kludgy way to ask for
* more space per symbol, the u32 is for the index on
* the ui browser.
* See symbol__browser_index.
*/
symbol_conf.priv_size += sizeof(u32);
symbol_conf.sort_by_name = true;
}
}

if (symbol__init() < 0)
return -1;
Expand Down
4 changes: 2 additions & 2 deletions tools/perf/builtin-timechart.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ static void sched_switch(int cpu, u64 timestamp, struct trace_entry *te)
if (p->current->state != TYPE_NONE)
pid_put_sample(sw->next_pid, p->current->state, cpu, p->current->state_since, timestamp);

p->current->state_since = timestamp;
p->current->state = TYPE_RUNNING;
p->current->state_since = timestamp;
p->current->state = TYPE_RUNNING;
}

if (prev_p->current) {
Expand Down
19 changes: 7 additions & 12 deletions tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#include "builtin.h"

#include "util/util.h"
#include "perf.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/exec_cmd.h"
#include "util/header.h"
#include "util/parse-options.h"
#include "util/session.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/exec_cmd.h"
#include "util/trace-event.h"
#include "util/session.h"
#include "util/util.h"

static char const *script_name;
static char const *generate_script_lang;
Expand Down Expand Up @@ -59,14 +62,6 @@ static int cleanup_scripting(void)
return scripting_ops->stop_script();
}

#include "util/parse-options.h"

#include "perf.h"
#include "util/debug.h"

#include "util/trace-event.h"
#include "util/exec_cmd.h"

static char const *input_name = "perf.data";

static int process_sample_event(event_t *event, struct perf_session *session)
Expand Down
3 changes: 3 additions & 0 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,9 @@ unsigned int hists__sort_list_width(struct hists *self)
if (!se->elide)
ret += 2 + hists__col_len(self, se->se_width_idx);

if (verbose) /* Addr + origin */
ret += 3 + BITS_PER_LONG / 4;

return ret;
}

Expand Down
Loading

0 comments on commit e66b688

Please sign in to comment.