Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201188
b: refs/heads/master
c: b1623e7
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Jul 22, 2010
1 parent 7a698ee commit 5884b03
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 78 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: 20a52d4f5998f4804af7c27651490647da62fd08
refs/heads/master: b1623e7eb280f853f60338c7bb68bd3f3a970205
11 changes: 9 additions & 2 deletions trunk/arch/powerpc/mm/hugetlbpage-hash64.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,15 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
}
}

if (unlikely(slot == -2))
panic("hash_huge_page: pte_insert failed\n");
/*
* Hypervisor failure. Restore old pte and return -1
* similar to __hash_page_*
*/
if (unlikely(slot == -2)) {
*ptep = __pte(old_pte);
err = -1;
goto out;
}

new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);
}
Expand Down
10 changes: 0 additions & 10 deletions trunk/include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@
/* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8)

/*
* Align to a 32 byte boundary equal to the
* alignment gcc 4.5 uses for a struct
*/
#define STRUCT_ALIGN() . = ALIGN(32)

/* The actual configuration determine if the init/exit sections
* are handled as text/data or they can be discarded (which
* often happens at runtime)
Expand Down Expand Up @@ -172,11 +166,7 @@
LIKELY_PROFILE() \
BRANCH_PROFILE() \
TRACE_PRINTKS() \
\
STRUCT_ALIGN(); \
FTRACE_EVENTS() \
\
STRUCT_ALIGN(); \
TRACE_SYSCALLS()

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/nconf.gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void fill_window(WINDOW *win, const char *text)
int len = get_line_length(line);
strncpy(tmp, line, min(len, x));
tmp[len] = '\0';
mvwprintw(win, i, 0, "%s", tmp);
mvwprintw(win, i, 0, tmp);
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
fi
$(MAKE) clean
$(PREV) ln -sf $(srctree) $(KERNELPATH)
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
$(PREV) rm $(KERNELPATH)
rm -f $(objtree)/.scmversion
Expand Down
16 changes: 6 additions & 10 deletions trunk/scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#

usage() {
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
echo "Usage: $0 [--scm-only] [srctree]" >&2
exit 1
}

scm_only=false
srctree=.
if test "$1" = "--save-scmversion"; then
if test "$1" = "--scm-only"; then
scm_only=true
shift
fi
Expand All @@ -30,12 +30,11 @@ fi

scm_version()
{
local short
short=false
local short=false

cd "$srctree"
if test -e .scmversion; then
cat .scmversion
cat "$_"
return
fi
if test "$1" = "--short"; then
Expand Down Expand Up @@ -132,15 +131,12 @@ collect_files()
}

if $scm_only; then
if test ! -e .scmversion; then
res=$(scm_version)
echo "$res" >.scmversion
fi
scm_version
exit
fi

if test -e include/config/auto.conf; then
. include/config/auto.conf
source "$_"
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it"
exit 1
Expand Down
40 changes: 19 additions & 21 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -600,32 +600,30 @@ endif

ifdef NO_DEMANGLE
BASIC_CFLAGS += -DNO_DEMANGLE
else ifdef HAVE_CPLUS_DEMANGLE
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
ifdef HAVE_CPLUS_DEMANGLE
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y")
has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y")

ifeq ($(has_bfd),y)
EXTLIBS += -lbfd
ifeq ($(has_bfd),y)
EXTLIBS += -lbfd
else
has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty),y)
EXTLIBS += -lbfd -liberty
else
has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty),y)
EXTLIBS += -lbfd -liberty
has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty_z),y)
EXTLIBS += -lbfd -liberty -lz
else
has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty_z),y)
EXTLIBS += -lbfd -liberty -lz
has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y")
ifeq ($(has_cplus_demangle),y)
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y")
ifeq ($(has_cplus_demangle),y)
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
BASIC_CFLAGS += -DNO_DEMANGLE
endif
msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
BASIC_CFLAGS += -DNO_DEMANGLE
endif
endif
endif
Expand Down
29 changes: 7 additions & 22 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,14 +631,9 @@ int hist_entry__fprintf(struct hist_entry *self, struct hists *pair_hists,
u64 session_total)
{
char bf[512];
int ret;

ret = hist_entry__snprintf(self, bf, sizeof(bf), pair_hists,
show_displacement, displacement,
true, session_total);
if (!ret)
return 0;

hist_entry__snprintf(self, bf, sizeof(bf), pair_hists,
show_displacement, displacement,
true, session_total);
return fprintf(fp, "%s\n", bf);
}

Expand Down Expand Up @@ -767,7 +762,6 @@ size_t hists__fprintf(struct hists *self, struct hists *pair,
print_entries:
for (nd = rb_first(&self->entries); nd; nd = rb_next(nd)) {
struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
int cnt;

if (show_displacement) {
if (h->pair != NULL)
Expand All @@ -777,13 +771,8 @@ size_t hists__fprintf(struct hists *self, struct hists *pair,
displacement = 0;
++position;
}
cnt = hist_entry__fprintf(h, pair, show_displacement,
displacement, fp, self->stats.total_period);
/* Ignore those that didn't match the parent filter */
if (!cnt)
continue;

ret += cnt;
ret += hist_entry__fprintf(h, pair, show_displacement,
displacement, fp, self->stats.total_period);

if (symbol_conf.use_callchain)
ret += hist_entry__fprintf_callchain(h, fp, self->stats.total_period);
Expand Down Expand Up @@ -976,17 +965,13 @@ static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file,
* Parse hexa addresses followed by ':'
*/
line_ip = strtoull(tmp, &tmp2, 16);
if (*tmp2 != ':' || tmp == tmp2 || tmp2[1] == '\0')
if (*tmp2 != ':' || tmp == tmp2)
line_ip = -1;
}

if (line_ip != -1) {
u64 start = map__rip_2objdump(self->ms.map, sym->start),
end = map__rip_2objdump(self->ms.map, sym->end);

u64 start = map__rip_2objdump(self->ms.map, sym->start);
offset = line_ip - start;
if (offset < 0 || (u64)line_ip > end)
offset = -1;
}

objdump_line = objdump_line__new(offset, line);
Expand Down
17 changes: 7 additions & 10 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,6 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,
{
struct dirent *dent;
DIR *dir = opendir(dir_name);
int ret = 0;

if (!dir) {
pr_debug("%s: cannot open %s dir\n", __func__, dir_name);
Expand All @@ -1466,9 +1465,8 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,

snprintf(path, sizeof(path), "%s/%s",
dir_name, dent->d_name);
ret = map_groups__set_modules_path_dir(self, path);
if (ret < 0)
goto out;
if (map_groups__set_modules_path_dir(self, path) < 0)
goto failure;
} else {
char *dot = strrchr(dent->d_name, '.'),
dso_name[PATH_MAX];
Expand All @@ -1489,18 +1487,17 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,
dir_name, dent->d_name);

long_name = strdup(path);
if (long_name == NULL) {
ret = -1;
goto out;
}
if (long_name == NULL)
goto failure;
dso__set_long_name(map->dso, long_name);
dso__kernel_module_get_build_id(map->dso, "");
}
}

out:
return 0;
failure:
closedir(dir);
return ret;
return -1;
}

static char *get_kernel_version(const char *root_dir)
Expand Down

0 comments on commit 5884b03

Please sign in to comment.