Skip to contentSkip to conversation

Problem in Tracing C Program

DISCUSSION MMM via lttng-dev 2 participants 4 messages Nov 30, 2017 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Dear Users,
I have posted a couple of email about my problem in the past, while nobody response those. It may be true that my question is amateurish, but due to the fact that I am a beginner, I can not find the sufficient document for solving my problem. I am going to trace a C program that read from a file and show the ratio of reads from page cache vs reads from disk. I read document of LTTng website, but I can not find appropriate explanation for this task. I just need a simple guidance to show me the right way for doing it. Could you please help me. Regards,Mehdi.

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 11 lines · MMM via lttng-dev

Dear Users,

I have posted a couple of email about my problem in the past, while nobody response those. It may be true that my question is amateurish, but due to the fact that I am a beginner, I can not find the sufficient document for solving my problem. I am going to trace a C program that read from a file and show the ratio of reads from page cache vs reads from disk. I read document of LTTng website, but I can not find appropriate explanation for this task. I just need a simple guidance to show me the right way for doing it. Could you please help me.

Quoted 2 lines

Regards,
Mehdi.

Hi,

This is a really non-trivial task to do. Basically, you need to distinguish the read() syscalls that lead to FS/disk access with the ones that don't (for the same FD).
The main difficulty is to make the link between the syscall and the lower-level events and I am not sure we have all the data needed to establish this link from the payload of the events we have (something like FD -> FS inode -> block).

I added Houssem to this thread because I think I remember he did some work around that, he may have more information.

Julien
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Dear Julien,
Thanks for your response. Is the mentioned task easier in Java or C program?indeed, I think it can be easier in Java program. If it is true, I can switch to Java language.

    On Thursday, November 30, 2017, 7:15:21 PM GMT+3:30, Julien Desfossez <[email protected]> wrote:  
Quoted 11 lines · MMM via lttng-dev

Dear Users,

I have posted a couple of email about my problem in the past, while nobody response those. It may be true that my question is amateurish, but due to the fact that I am a beginner, I can not find the sufficient document for solving my problem. I am going to trace a C program that read from a file and show the ratio of reads from page cache vs reads from disk. I read document of LTTng website, but I can not find appropriate explanation for this task. I just need a simple guidance to show me the right way for doing it. Could you please help me.

Quoted 2 lines

Regards,
Mehdi.

Hi,

This is a really non-trivial task to do. Basically, you need to distinguish the read() syscalls that lead to FS/disk access with the ones that don't (for the same FD).
The main difficulty is to make the link between the syscall and the lower-level events and I am not sure we have all the data needed to establish this link from the payload of the events we have (something like FD -> FS inode -> block).

I added Houssem to this thread because I think I remember he did some work around that, he may have more information.

Julien

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 5 lines · MMM

Dear Julien,

Thanks for your response. Is the mentioned task easier in Java or C program? indeed, I think it can be easier in Java program. If it is true, I can switch to Java language.

No, your test program should be in C because it will be easy to link the open()/read() calls from your C program to the open/read system calls.

Julien

Quoted 32 lines

On Thursday, November 30, 2017, 7:15:21 PM GMT+3:30, Julien Desfossez <[email protected]> wrote:

Quoted 11 lines · MMM via lttng-dev

Dear Users,

I have posted a couple of email about my problem in the past, while nobody response those. It may be true that my question is amateurish, but due to the fact that I am a beginner, I can not find the sufficient document for solving my problem. I am going to trace a C program that read from a file and show the ratio of reads from page cache vs reads from disk. I read document of LTTng website, but I can not find appropriate explanation for this task. I just need a simple guidance to show me the right way for doing it. Could you please help me.

Quoted 2 lines

Regards,
Mehdi.

Hi,

This is a really non-trivial task to do. Basically, you need to distinguish the read() syscalls that lead to FS/disk access with the ones that don't (for the same FD).
The main difficulty is to make the link between the syscall and the lower-level events and I am not sure we have all the data needed to establish this link from the payload of the events we have (something like FD -> FS inode -> block).

Quoted 4 lines

I added Houssem to this thread because I think I remember he did some work around that, he may have more information.

Julien

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev