Thursday, April 15, 2010

linux.kernel - 5 new messages in 4 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* perf probe: Show function entry line as probe-able - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/0ea2dd9cd4838ce7?hl=en
* [PATCH 00/12] perf: introduce model specific events and AMD IBS - 2 messages,
1 author
http://groups.google.com/group/linux.kernel/t/3660ac7771798be1?hl=en
* gconfig: add support to show hidden options that have prompts - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/c592bccece17ebb4?hl=en
* [kidled]: introduce kidled. - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/65020df559ad12ae?hl=en

==============================================================================
TOPIC: perf probe: Show function entry line as probe-able
http://groups.google.com/group/linux.kernel/t/0ea2dd9cd4838ce7?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Apr 15 2010 12:40 am
From: tip-bot for Masami Hiramatsu


Commit-ID: f6c903f5856ffa75ae19dcee4dbb5093e320d45c
Gitweb: http://git.kernel.org/tip/f6c903f5856ffa75ae19dcee4dbb5093e320d45c
Author: Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Wed, 14 Apr 2010 18:40:07 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 14 Apr 2010 17:45:39 -0300

perf probe: Show function entry line as probe-able

Function entry line should be shown as probe-able line,
because each function has declared line attribute.

LKML-Reference: <20100414224007.14630.96915.stgit@localhost6.localdomain6>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 74 ++++++++++++++++++++++++++++++++++------
1 files changed, 63 insertions(+), 11 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 03b4691..3e79775 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1127,6 +1127,45 @@ end:
return ret;
}

+/* Add a line and store the src path */
+static int line_range_add_line(const char *src, unsigned int lineno,
+ struct line_range *lr)
+{
+ /* Copy real path */
+ if (!lr->path) {
+ lr->path = strdup(src);
+ if (lr->path == NULL)
+ return -ENOMEM;
+ }
+ return line_list__add_line(&lr->line_list, lineno);
+}
+
+/* Search function declaration lines */
+static int line_range_funcdecl_cb(Dwarf_Die *sp_die, void *data)
+{
+ struct dwarf_callback_param *param = data;
+ struct line_finder *lf = param->data;
+ const char *src;
+ int lineno;
+
+ src = dwarf_decl_file(sp_die);
+ if (src && strtailcmp(src, lf->fname) != 0)
+ return DWARF_CB_OK;
+
+ if (dwarf_decl_line(sp_die, &lineno) != 0 ||
+ (lf->lno_s > lineno || lf->lno_e < lineno))
+ return DWARF_CB_OK;
+
+ param->retval = line_range_add_line(src, lineno, lf->lr);
+ return DWARF_CB_OK;
+}
+
+static int find_line_range_func_decl_lines(struct line_finder *lf)
+{
+ struct dwarf_callback_param param = {.data = (void *)lf, .retval = 0};
+ dwarf_getfuncs(&lf->cu_die, line_range_funcdecl_cb, &param, 0);
+ return param.retval;
+}

/* Find line range from its line number */
static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
@@ -1135,7 +1174,7 @@ static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
Dwarf_Line *line;
size_t nlines, i;
Dwarf_Addr addr;
- int lineno;
+ int lineno, ret = 0;
const char *src;
Dwarf_Die die_mem;

@@ -1145,6 +1184,7 @@ static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
return -ENOENT;
}

+ /* Search probable lines on lines list */
for (i = 0; i < nlines; i++) {
line = dwarf_onesrcline(lines, i);
if (dwarf_lineno(line, &lineno) != 0 ||
@@ -1167,22 +1207,34 @@ static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
if (strtailcmp(src, lf->fname) != 0)
continue;

- /* Copy real path */
- if (!lf->lr->path) {
- lf->lr->path = strdup(src);
- if (lf->lr->path == NULL)
- return -ENOMEM;
- }
- line_list__add_line(&lf->lr->line_list, lineno);
+ ret = line_range_add_line(src, lineno, lf->lr);
+ if (ret < 0)
+ return ret;
}
+
+ /*
+ * Dwarf lines doesn't include function declarations. We have to
+ * check functions list or given function.
+ */
+ if (sp_die) {
+ src = dwarf_decl_file(sp_die);
+ if (src && dwarf_decl_line(sp_die, &lineno) == 0 &&
+ (lf->lno_s <= lineno && lf->lno_e >= lineno))
+ ret = line_range_add_line(src, lineno, lf->lr);
+ } else
+ ret = find_line_range_func_decl_lines(lf);
+
/* Update status */
- if (!list_empty(&lf->lr->line_list))
- lf->found = 1;
+ if (ret >= 0)
+ if (!list_empty(&lf->lr->line_list))
+ ret = lf->found = 1;
+ else
+ ret = 0; /* Lines are not found */
else {
free(lf->lr->path);
lf->lr->path = NULL;
}
- return lf->found;
+ return ret;
}

static int line_range_inline_cb(Dwarf_Die *in_die, void *data)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: [PATCH 00/12] perf: introduce model specific events and AMD IBS
http://groups.google.com/group/linux.kernel/t/3660ac7771798be1?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Apr 15 2010 12:50 am
From: Peter Zijlstra


On Tue, 2010-04-13 at 22:45 +0200, Robert Richter wrote:
> On 13.04.10 22:23:09, Robert Richter wrote:
> > This patch series introduces model specific events and impments AMD
> > IBS (Instruction Based Sampling) for perf_events.
>
> The patch set triggers this warning in perf_prepare_sample():
>
> WARN_ON_ONCE(size & (sizeof(u64)-1))
>
> Should a raw data sample padded to 64 bit?

Yes it should.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 2 of 2 ==
Date: Thurs, Apr 15 2010 12:50 am
From: Peter Zijlstra


On Tue, 2010-04-13 at 22:23 +0200, Robert Richter wrote:
> This patch series introduces model specific events and impments AMD
> IBS (Instruction Based Sampling) for perf_events.

I would much rather it uses the ->precise thing PEBS also uses,
otherwise we keep growing funny arch extensions and end up with a
totally fragmented trainwreck of an ABI.

> The general approach is to introduce a flag to mark an event as model
> specific. With that flag set a model specific ibs (raw) config value
> can be passed to the pmu for setup. When there are ibs samples
> available, it is sent back as a raw data sample to the userland. So we
> have a raw config value and raw sampling data. This requires the
> userland to setup ibs and further extract and process sampling data.
>
> Patches 1-8 rework and refactor the code to prepare the ibs
> implementation. This is done in patches 9-12.
>
> I will add ibs example code to libpfm4.

Please add a valid usecase to tools/perf/ instead.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: gconfig: add support to show hidden options that have prompts
http://groups.google.com/group/linux.kernel/t/c592bccece17ebb4?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Apr 15 2010 12:50 am
From: Li Zefan


Randy Dunlap wrote:
> On Wed, 14 Apr 2010 11:46:24 +0800 Li Zefan wrote:
>
>> There's a button in gconfig to "Show all options", but I think
>> normally we are not interested in those configs which have no
>> prompt and thus can't be changed, so here I add a new button to
>> show hidden options which have prompts.
>
> (The new option is called "Show all prompt options".)
>
> These patches are looking good so far in my limited testing.
>
> However, if gconfig is going to live, it needs at least one more thing:
> it should display the kconfig symbol type (tristate, boolean, etc.)
> like xconfig does (explicitly) and menuconfig does (by using [x] or <x>
> in the menu).
>

Hmm, I think I can spend some time on this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: [kidled]: introduce kidled.
http://groups.google.com/group/linux.kernel/t/65020df559ad12ae?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Apr 15 2010 12:50 am
From: Peter Zijlstra


On Wed, 2010-04-14 at 08:41 -0700, Salman Qazi wrote:
>
> To capture all the quantities for a CPU atomically, they must be read
> on the CPU. Basically, reading them on that CPU prevents them from
> changing as we read them.
>
> Also, if the CPU is idle (injected or otherwise), the quantities won't
> get updated.

Who cares? by the time they reach userspace they've changed anyway.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


==============================================================================

You received this message because you are subscribed to the Google Groups "linux.kernel"
group.

To post to this group, visit http://groups.google.com/group/linux.kernel?hl=en

To unsubscribe from this group, send email to linux.kernel+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/linux.kernel/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate