由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - how to get runtime caller function?
相关主题
请教template和factory有啥区别?请问 为何 如下代码 catch 不到 overflow exception。
问个矩阵作为参数, C programming的问题C的问题,高手请指点
弱问:c++里面throw就相当于return了吧?这样会不会造成memory leak?
输入参数的检查应该归caller还是callee?copy_from_user() 是怎么知道缓存长度的? (转载)
Exception用golang实现了map,大牛给看看?
被reference搞晕了怎样能把go写的稍微漂亮一点?
How to get user name of a process on Windowsscala的基于future并行async程序怎么写
Dynamic buffer management question请教一个C++有关的编译问题
相关话题的讨论汇总
话题: runtime话题: caller话题: function话题: get话题: c++
进入Programming版参与讨论
1 (共1页)
p*u
发帖数: 2454
1
i got a function which is called by many others, now i want to
know who the callers are at runtime. How can I do this in C++, say
print out the caller functions names? thanks.
P*****f
发帖数: 2272
2
also can try some debuger api
you may get some hint
p*u
发帖数: 2454
3
gprof cannot profile kernel, i used oprof but there's no call graph, sigh.

usage
k**m
发帖数: 222
4
Many peformance tools (profiler) can do this. For example, gprof from GNU,
Vtune from Intel, and Sun's Performance Analyzer. Check their manual for usage
.
You problem seems to be a typical call-graph profiling problem. C++ may be
tricky because the function names might be changed by compilers to some
strange ones.

【在 p*u 的大作中提到】
: i got a function which is called by many others, now i want to
: know who the callers are at runtime. How can I do this in C++, say
: print out the caller functions names? thanks.

p*u
发帖数: 2454
5
thanks a lot, i will give it a try and let you know what i get.
1 (共1页)
进入Programming版参与讨论
相关主题
请教一个C++有关的编译问题Exception
A C++ runtime type casting question被reference搞晕了
人无食不活,码无库不通How to get user name of a process on Windows
急问,有哪位面过微软SDET的大哥啊!能否帮一下小弟!Dynamic buffer management question
请教template和factory有啥区别?请问 为何 如下代码 catch 不到 overflow exception。
问个矩阵作为参数, C programming的问题C的问题,高手请指点
弱问:c++里面throw就相当于return了吧?这样会不会造成memory leak?
输入参数的检查应该归caller还是callee?copy_from_user() 是怎么知道缓存长度的? (转载)
相关话题的讨论汇总
话题: runtime话题: caller话题: function话题: get话题: c++