-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support max/min timestamp in report output #1898
Comments
That looks a good idea.
But I worry adding many fields as each result of |
Right, but I think |
Yeah, the current |
Sounds good. |
Hello @namhyung @honggyukim, I am an undergraduate student from Beihang University in Beijing, China, currently enrolled in a course focused on open source projects. I believe you both are welcoming to newcomers like me. I appreciate that you've labeled the issue with the "good-first-issue" tag and provided helpful guidance. I'm thankful for that and eager to contribute. I'd like to start by working on the four additional fields for the report. Given the existing codebase, I believe this task should be manageable. Additionally, the "too long for display" issue seems interesting and practical. I am also interested in implementing the pattern matching function. Could I please have the opportunity to contribute to such an excellent project? I would be grateful for the chance to participate. Thank you. |
Hello @Cosh-y! We always welcome new contributors. :) Please read the CONTRIBUTING.md carefully and try to follow the existing convention in the commit history. I'm looking forward to seeing your PR soon! |
Hello @namhyung , I have learned your code and similar work #1913. I learned how to add new fields in report output, but I still have a question before coding. How can I get the correct timestamp? I have noticed that in cmds/report.c build_function_tree passes task and tampstamp into find_insert_node, and uftrace_report_node is finally updated in insert_node. So which timestamp should I use?
I found it's difficult for me to figure out the exactly meaning of these variables. Should I read more codes and learn about how uftrace collects these data or would you give me some hints so that I can do the remaining work? Thanks For Your Help! |
The |
This patch introduces timestamps for special function calls that take the minimum or maximum time. With this capability, users can identify function calls that exhibit unusual execution times and investigate the underlying reasons. Example usage: $ uftrace report -f total-min-ts,total-max-ts Total min ts Total max ts Function ============ ============ ==================== 12.009 h 12.009 h main 12.009 h 12.009 h printf 12.009 h 12.009 h __monstartup 12.009 h 12.009 h __cxa_atexit Resolves: namhyung#1898 Signed-off-by: Hanyu Cui <ambition0316@126.com>
This patch introduces timestamps for special function calls that take the minimum or maximum time. With this capability, users can identify function calls that exhibit unusual execution times and investigate the underlying reasons. Example usage: $ uftrace report -f total-min-ts,total-max-ts Total min ts Total max ts Function ============ ============ ==================== 12.009 h 12.009 h main 12.009 h 12.009 h printf 12.009 h 12.009 h __monstartup 12.009 h 12.009 h __cxa_atexit Resolves: namhyung#1898 Signed-off-by: Hanyu Cui <ambition0316@126.com>
This patch introduces timestamps for special function calls that take the minimum or maximum time. With this capability, users can identify function calls that exhibit unusual execution times and investigate the underlying reasons. Example usage: $ uftrace report -f total-min-ts,total-max-ts Total min ts Total max ts Function ============ ============ ==================== 12.009 h 12.009 h main 12.009 h 12.009 h printf 12.009 h 12.009 h __monstartup 12.009 h 12.009 h __cxa_atexit Resolves: namhyung#1898 Signed-off-by: Hanyu Cui <ambition0316@126.com>
This patch introduces timestamps for special function calls that take the minimum or maximum time. With this capability, users can identify function calls that exhibit unusual execution times and investigate the underlying reasons. Example usage: $ uftrace report -f total-min-ts,total-max-ts Total min ts Total max ts Function ================== ================== ==================== 583.957018293 583.957018293 main 583.957026996 583.957026996 __isoc99_scanf 585.431639051 585.431610568 printf 585.431609834 585.431609834 fibonacci 585.431639443 585.431639443 putchar 583.957012086 583.957012086 __monstartup 583.957013929 583.957013929 __cxa_atexit Resolves: namhyung#1898 Signed-off-by: Hanyu Cui <ambition0316@126.com>
I think it's useful to provide timestamp information in the report so that users can replay at the given time later. For example, when some function is called a lot, it runs mostly very short but sometimes it takes long. Then users want to see where it is, and what happened during the call. So I suggest 4 more output fields -
total-max-ts
,total-min-ts
,self-max-ts
, andself-min-ts
. They will have a timestamp of function ENTRY for the cases respectively.struct uftrace_report_node
hasstruct report_time_stat
for total and self time already. So it's easier to extend it to save timestamp.The text was updated successfully, but these errors were encountered: