Comments (5)
@Taeung Hi, the --time-range
option requires 2 time values separate by ~
. You can omit one of them but not the ~
. So you should use +1us~
(if you want to see functions after 1us from the beginning) or ~+1us
(to see functions before 1us from the beginning) instead.
from uftrace.
Ah, I understood it.
After uftrace record
$ uftrace record ./a.out
In accardance with the elapsed time, we can see a part of function graph as below.
$ uftrace replay -f elapsed -r +20us~
# ELAPSED FUNCTION
20.034 us | } /* strdup */
20.206 us | strsep();
20.432 us | atoi();
20.721 us | atoi();
20.954 us | } /* get_values_from */
21.060 us | fgets();
21.302 us | get_values_from() {
...
But I think duration of default view can cause confusion from the point of view of newbies.
For example, If the user just do uftrace replay -r +20us~
after recording,
$ uftrace replay -r +20us~
# DURATION TID FUNCTION
[22335] | } /* strdup */
0.091 us [22335] | strsep();
0.150 us [22335] | atoi();
0.122 us [22335] | atoi();
0.920 us [22335] | } /* get_values_from */
0.128 us [22335] | fgets();
[22335] | get_values_from() {
...
But the time of --time-range
option isn't related to duration. (confusing point, IMHO)
So the user can check with -f elapsed
as below.
uftrace replay -f elapsed -r +20us~
# ELAPSED FUNCTION
20.034 us | } /* strdup */
20.206 us | strsep();
20.432 us | atoi();
20.721 us | atoi();
20.954 us | } /* get_values_from */
21.060 us | fgets();
21.302 us | get_values_from() {
...
Additionally if the user want to see both duration and elaped time,
the user can supplementally use -f duration,elapsed
as below
uftrace replay -f duration,elapsed -r +20us~
# DURATION ELAPSED FUNCTION
20.034 us | } /* strdup */
0.091 us 20.206 us | strsep();
0.150 us 20.432 us | atoi();
0.122 us 20.721 us | atoi();
0.920 us 20.954 us | } /* get_values_from */
0.128 us 21.060 us | fgets();
21.302 us | get_values_from() {
...
I think it is better to show function graph with elapsed time by default when the user use time-range
like -r +20us
with elapsed time.
And if the user use time-range
option with time stamp, we can show function graph with time stamp by default.
What do you think about it ?
from uftrace.
I'm not sure that's what user want always. I think I want to see duration anyway but time range is used only to limit the data range displayed.
from uftrace.
What about this ? Adding timestamp or elapsed time column to default veiw when using time-range
For example,
- If using
time-range
with timestamp, we can show as below by default.
$ uftrace replay -r 184832.543807090~184832.543817869
# TIMESTAMP DURATION TID FUNCTION
184832.543807090 [22335] | get_values_from() {
184832.543807281 0.829 us [22335] | strdup();
184832.543808362 0.670 us [22335] | strsep();
184832.543809277 0.754 us [22335] | atoi();
184832.543810195 0.217 us [22335] | atoi();
184832.543810580 3.490 us [22335] | } /* get_values_from */
...
- If using
time-range
with elapsed time, we can show as below by default.
$ uftrace replay -r +20us~
# ELAPSED DURATION TID FUNCTION
20.034 us [22335] | } /* strdup */
20.206 us 0.091 us [22335] | strsep();
20.432 us 0.150 us [22335] | atoi();
20.721 us 0.122 us [22335] | atoi();
20.954 us 0.920 us [22335] | } /* get_values_from */
...
It is just my opinion ๐
What do you think about it ?
from uftrace.
Looks ok to me.
from uftrace.
Related Issues (20)
- how to trace a dynamic lib HOT 7
- Build failures with LTO HOT 2
- Segmentation fault with uftrace dump --flame-graph HOT 8
- Typo in README: Redundant 'the' in documentation
- Improve Documentation about Flame Graph (with --sample-time examples) HOT 1
- Compile warning on `โsizeofโ in the earlier argument and not in the later argument` HOT 2
- Compile warning caused by Python3.12 header from `-Wdeclaration-after-statement` HOT 2
- what should i do when i want to trace a member function? HOT 1
- demangling failure with __device_stub_ prefix HOT 5
- "./misc/demangler --unknown" triggers segfault
- How to get uftrace data before the process terminates? HOT 3
- Segmentation fault HOT 8
- "<" symbol causes bad output with "uftrace dump --mermaid" HOT 2
- How to show function calling process in real time? HOT 1
- Segmentation fault HOT 7
- WARN: child terminated by signal: 11: Segmentation fault fault for ( C++ ) HOT 10
- WARN: Segmentation fault: address not mapped in llama.cpp HOT 12
- WARN: Cannot open record data: uftrace_524528: No such file or directory? HOT 6
- Does not work on binaries linked with mold HOT 2
- I want to automatically generate a /info file when the program ends. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uftrace.