perf tools: Add dso__type()
dso__type() determines wheather a dso is 32-bit, x32 (32-bit with 64-bit registers) or 64-bit. dso__type() will be used to determine the VDSO a program maps. Reviewed-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1406035081-14301-51-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
51682dc744
commit
2b5b8bb27b
@@ -5,6 +5,7 @@
|
||||
#include <linux/rbtree.h>
|
||||
#include <stdbool.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
#include "map.h"
|
||||
#include "build-id.h"
|
||||
|
||||
@@ -50,6 +51,13 @@ enum dso_data_status_seen {
|
||||
DSO_DATA_STATUS_SEEN_ITRACE,
|
||||
};
|
||||
|
||||
enum dso_type {
|
||||
DSO__TYPE_UNKNOWN,
|
||||
DSO__TYPE_64BIT,
|
||||
DSO__TYPE_32BIT,
|
||||
DSO__TYPE_X32BIT,
|
||||
};
|
||||
|
||||
#define DSO__SWAP(dso, type, val) \
|
||||
({ \
|
||||
type ____r = val; \
|
||||
@@ -245,4 +253,6 @@ static inline bool dso__is_kcore(struct dso *dso)
|
||||
|
||||
void dso__free_a2l(struct dso *dso);
|
||||
|
||||
enum dso_type dso__type(struct dso *dso, struct machine *machine);
|
||||
|
||||
#endif /* __PERF_DSO */
|
||||
|
Reference in New Issue
Block a user