Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9821517a
Commit
9821517a
authored
Feb 09, 2019
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by:
Ingo Molnar
<
mingo@kernel.org
>
parents
ca3bb3d0
3bb26006
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
17 deletions
+69
-17
tools/include/uapi/linux/in.h
tools/include/uapi/linux/in.h
+1
-1
tools/perf/Documentation/perf-c2c.txt
tools/perf/Documentation/perf-c2c.txt
+12
-4
tools/perf/Documentation/perf-mem.txt
tools/perf/Documentation/perf-mem.txt
+1
-1
tools/perf/arch/powerpc/util/Build
tools/perf/arch/powerpc/util/Build
+1
-0
tools/perf/arch/powerpc/util/mem-events.c
tools/perf/arch/powerpc/util/mem-events.c
+11
-0
tools/perf/builtin-trace.c
tools/perf/builtin-trace.c
+18
-7
tools/perf/tests/evsel-tp-sched.c
tools/perf/tests/evsel-tp-sched.c
+1
-1
tools/perf/util/c++/clang.cpp
tools/perf/util/c++/clang.cpp
+1
-1
tools/perf/util/mem-events.c
tools/perf/util/mem-events.c
+1
-1
tools/perf/util/symbol-elf.c
tools/perf/util/symbol-elf.c
+22
-1
No files found.
tools/include/uapi/linux/in.h
View file @
9821517a
...
...
@@ -268,7 +268,7 @@ struct sockaddr_in {
#define IN_MULTICAST(a) IN_CLASSD(a)
#define IN_MULTICAST_NET 0xe0000000
#define IN_BADCLASS(a) (((
(long int) (a) ) ==
0xffffffff)
#define IN_BADCLASS(a) (((
long int) (a) ) == (long int)
0xffffffff)
#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
...
...
tools/perf/Documentation/perf-c2c.txt
View file @
9821517a
...
...
@@ -19,8 +19,11 @@ C2C stands for Cache To Cache.
The perf c2c tool provides means for Shared Data C2C/HITM analysis. It allows
you to track down the cacheline contentions.
The tool is based on x86's load latency and precise store facility events
provided by Intel CPUs. These events provide:
On x86, the tool is based on load latency and precise store facility events
provided by Intel CPUs. On PowerPC, the tool uses random instruction sampling
with thresholding feature.
These events provide:
- memory address of the access
- type of the access (load and store details)
- latency (in cycles) of the load access
...
...
@@ -46,7 +49,7 @@ RECORD OPTIONS
-l::
--ldlat::
Configure mem-loads latency.
Configure mem-loads latency.
(x86 only)
-k::
--all-kernel::
...
...
@@ -119,11 +122,16 @@ Following perf record options are configured by default:
-W,-d,--phys-data,--sample-cpu
Unless specified otherwise with '-e' option, following events are monitored by
default:
default
on x86
:
cpu/mem-loads,ldlat=30/P
cpu/mem-stores/P
and following on PowerPC:
cpu/mem-loads/
cpu/mem-stores/
User can pass any 'perf record' option behind '--' mark, like (to enable
callchains and system wide monitoring):
...
...
tools/perf/Documentation/perf-mem.txt
View file @
9821517a
...
...
@@ -82,7 +82,7 @@ RECORD OPTIONS
Be more verbose (show counter open errors, etc)
--ldlat <n>::
Specify desired latency for loads event.
Specify desired latency for loads event.
(x86 only)
In addition, for report all perf report options are valid, and for record
all perf record options.
...
...
tools/perf/arch/powerpc/util/Build
View file @
9821517a
...
...
@@ -2,6 +2,7 @@ libperf-y += header.o
libperf
-
y
+=
sym
-
handling
.
o
libperf
-
y
+=
kvm
-
stat
.
o
libperf
-
y
+=
perf_regs
.
o
libperf
-
y
+=
mem
-
events
.
o
libperf
-
$
(
CONFIG_DWARF
)
+=
dwarf
-
regs
.
o
libperf
-
$
(
CONFIG_DWARF
)
+=
skip
-
callchain
-
idx
.
o
...
...
tools/perf/arch/powerpc/util/mem-events.c
0 → 100644
View file @
9821517a
// SPDX-License-Identifier: GPL-2.0
#include "mem-events.h"
/* PowerPC does not support 'ldlat' parameter. */
char
*
perf_mem_events__name
(
int
i
)
{
if
(
i
==
PERF_MEM_EVENTS__LOAD
)
return
(
char
*
)
"cpu/mem-loads/"
;
return
(
char
*
)
"cpu/mem-stores/"
;
}
tools/perf/builtin-trace.c
View file @
9821517a
...
...
@@ -2514,19 +2514,30 @@ static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
static
bool
perf_evlist__add_vfs_getname
(
struct
perf_evlist
*
evlist
)
{
struct
perf_evsel
*
evsel
=
perf_evsel__newtp
(
"probe"
,
"vfs_getname"
);
bool
found
=
false
;
struct
perf_evsel
*
evsel
,
*
tmp
;
struct
parse_events_error
err
=
{
.
idx
=
0
,
};
int
ret
=
parse_events
(
evlist
,
"probe:vfs_getname*"
,
&
err
);
if
(
IS_ERR
(
evsel
)
)
if
(
ret
)
return
false
;
if
(
perf_evsel__field
(
evsel
,
"pathname"
)
==
NULL
)
{
evlist__for_each_entry_safe
(
evlist
,
evsel
,
tmp
)
{
if
(
!
strstarts
(
perf_evsel__name
(
evsel
),
"probe:vfs_getname"
))
continue
;
if
(
perf_evsel__field
(
evsel
,
"pathname"
))
{
evsel
->
handler
=
trace__vfs_getname
;
found
=
true
;
continue
;
}
list_del_init
(
&
evsel
->
node
);
evsel
->
evlist
=
NULL
;
perf_evsel__delete
(
evsel
);
return
false
;
}
evsel
->
handler
=
trace__vfs_getname
;
perf_evlist__add
(
evlist
,
evsel
);
return
true
;
return
found
;
}
static
struct
perf_evsel
*
perf_evsel__new_pgfault
(
u64
config
)
...
...
tools/perf/tests/evsel-tp-sched.c
View file @
9821517a
...
...
@@ -17,7 +17,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
return
-
1
;
}
is_signed
=
!!
(
field
->
flags
|
TEP_FIELD_IS_SIGNED
);
is_signed
=
!!
(
field
->
flags
&
TEP_FIELD_IS_SIGNED
);
if
(
should_be_signed
&&
!
is_signed
)
{
pr_debug
(
"%s:
\"
%s
\"
signedness(%d) is wrong, should be %d
\n
"
,
evsel
->
name
,
name
,
is_signed
,
should_be_signed
);
...
...
tools/perf/util/c++/clang.cpp
View file @
9821517a
...
...
@@ -160,7 +160,7 @@ getBPFObjectFromModule(llvm::Module *Module)
}
PM
.
run
(
*
Module
);
return
std
::
move
(
Buffer
)
;
return
Buffer
;
}
}
...
...
tools/perf/util/mem-events.c
View file @
9821517a
...
...
@@ -28,7 +28,7 @@ struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX] = {
static
char
mem_loads_name
[
100
];
static
bool
mem_loads_name__init
;
char
*
perf_mem_events__name
(
int
i
)
char
*
__weak
perf_mem_events__name
(
int
i
)
{
if
(
i
==
PERF_MEM_EVENTS__LOAD
)
{
if
(
!
mem_loads_name__init
)
{
...
...
tools/perf/util/symbol-elf.c
View file @
9821517a
...
...
@@ -19,6 +19,20 @@
#define EM_AARCH64 183
/* ARM 64 bit */
#endif
#ifndef ELF32_ST_VISIBILITY
#define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
#endif
/* For ELF64 the definitions are the same. */
#ifndef ELF64_ST_VISIBILITY
#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
#endif
/* How to extract information held in the st_other field. */
#ifndef GELF_ST_VISIBILITY
#define GELF_ST_VISIBILITY(val) ELF64_ST_VISIBILITY (val)
#endif
typedef
Elf64_Nhdr
GElf_Nhdr
;
#ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
...
...
@@ -87,6 +101,11 @@ static inline uint8_t elf_sym__type(const GElf_Sym *sym)
return
GELF_ST_TYPE
(
sym
->
st_info
);
}
static
inline
uint8_t
elf_sym__visibility
(
const
GElf_Sym
*
sym
)
{
return
GELF_ST_VISIBILITY
(
sym
->
st_other
);
}
#ifndef STT_GNU_IFUNC
#define STT_GNU_IFUNC 10
#endif
...
...
@@ -111,7 +130,9 @@ static inline int elf_sym__is_label(const GElf_Sym *sym)
return
elf_sym__type
(
sym
)
==
STT_NOTYPE
&&
sym
->
st_name
!=
0
&&
sym
->
st_shndx
!=
SHN_UNDEF
&&
sym
->
st_shndx
!=
SHN_ABS
;
sym
->
st_shndx
!=
SHN_ABS
&&
elf_sym__visibility
(
sym
)
!=
STV_HIDDEN
&&
elf_sym__visibility
(
sym
)
!=
STV_INTERNAL
;
}
static
bool
elf_sym__filter
(
GElf_Sym
*
sym
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment