On Fri, 26 Sep 2014 11:22:34 -0300, Arnaldo Carvalho de Melo wrote:
Em Wed, Sep 24, 2014 at 11:45:40AM -0400, Waiman Long escreveu:I guess it's because we split maps and dsos by section name (for kernel
+ /*Huh? Can you elaborate on this? Ho can we add multiple DSOs with the
+ * Find node with the matching name
+ */
+ while (*p) {
+ struct dso *this = rb_entry(*p, struct dso, rb_node);
+ long rc = (long)strcmp(name, this->long_name);
+
+ parent = *p;
+ if (rc == 0) {
+ /*
+ * In case the new DSO is a duplicate of an existing
+ * one, print an one-time warning& sort the entry
+ * by its DSO address.
+ */
+ if (!dso || (dso == this))
+ return this; /* Find matching dso */
+ /*
+ * The kernel DSOs may have duplicated long name,
+ * so don't print warning for them.
+ */
+ if (!warned&& !strstr(name, "kernel.kallsyms")
+ && !strstr(name, "/vmlinux")) {
+ pr_warning("Duplicated dso long name: %s\n",
+ name);
exact same name into this tree? Have you actually seen this in practice?
I guess so, judging by the comment above ("may have").
only). Please look at dso__load_sym() - If map_groups__find_by_name()
with short name + section name fails, it creates a new dso and map, and
then curr_dso->long_name will be set as dso->long_name.
Thanks,
Namhyung