lkml.org 
[lkml]   [2015]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v2 04/15] perf tools: Add functions to get calling regs
Date
For generating function formal parameters without debuginfo, add
function to get names and offsets of architecture dependent calling
regs.

Signed-off-by: He Kuang <hekuang@huawei.com>
---
tools/perf/util/include/dwarf-regs.h | 2 ++
tools/perf/util/probe-finder.c | 10 ++++++++++
2 files changed, 12 insertions(+)

diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include/dwarf-regs.h
index 566ff6d..dc02243 100644
--- a/tools/perf/util/include/dwarf-regs.h
+++ b/tools/perf/util/include/dwarf-regs.h
@@ -16,6 +16,8 @@ struct arch_regs_info {
const char *get_arch_regstr(unsigned int n);
int get_arch_reg_offset(unsigned int n);
int get_arch_reg_size(unsigned int n);
+const char *get_arch_calling_reg_str(unsigned int n);
+int get_arch_calling_reg_offset(unsigned int n);
#endif

#endif
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 681af00..4de7649 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -169,6 +169,16 @@ get_arch_reg_size(unsigned int n __maybe_unused) {
return -1;
}

+const char __attribute__ ((weak))
+*get_arch_calling_reg_str(unsigned int n __maybe_unused) {
+ return NULL;
+}
+
+int __attribute__ ((weak))
+get_arch_calling_reg_offset(unsigned int n __maybe_unused) {
+ return -1;
+}
+
/*
* Convert a location into trace_arg.
* If tvar == NULL, this just checks variable can be converted.
--
1.8.5.2


\
 
 \ /
  Last update: 2015-05-24 11:01    [W:0.115 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site