All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem in Tracing C Program
       [not found] <1968389067.5193789.1512054837510.ref@mail.yahoo.com>
@ 2017-11-30 15:13 ` MMM via lttng-dev
       [not found] ` <1968389067.5193789.1512054837510@mail.yahoo.com>
  1 sibling, 0 replies; 4+ messages in thread
From: MMM via lttng-dev @ 2017-11-30 15:13 UTC (permalink / raw)
  To: Lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 577 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 983 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem in Tracing C Program
       [not found] ` <1968389067.5193789.1512054837510@mail.yahoo.com>
@ 2017-11-30 15:45   ` Julien Desfossez
       [not found]   ` <78c5dc0c-f6d4-448e-2562-5c282e5ac538@efficios.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Desfossez @ 2017-11-30 15:45 UTC (permalink / raw)
  To: MMM, Lttng-dev, Houssem Daoud

On 2017-11-30 10:13 AM, MMM via lttng-dev wrote:
> 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.

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
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem in Tracing C Program
       [not found]   ` <78c5dc0c-f6d4-448e-2562-5c282e5ac538@efficios.com>
@ 2017-11-30 17:51     ` MMM via lttng-dev
       [not found]     ` <1222277784.5319970.1512064280572@mail.yahoo.com>
  1 sibling, 0 replies; 4+ messages in thread
From: MMM via lttng-dev @ 2017-11-30 17:51 UTC (permalink / raw)
  To: Lttng-dev, Houssem Daoud, Julien Desfossez


[-- Attachment #1.1: Type: text/plain, Size: 1523 bytes --]

 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 <jdesfossez@efficios.com> wrote:  
 
 On 2017-11-30 10:13 AM, MMM via lttng-dev wrote:
> 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.

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  

[-- Attachment #1.2: Type: text/html, Size: 2732 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem in Tracing C Program
       [not found]     ` <1222277784.5319970.1512064280572@mail.yahoo.com>
@ 2017-11-30 18:57       ` Julien Desfossez
  0 siblings, 0 replies; 4+ messages in thread
From: Julien Desfossez @ 2017-11-30 18:57 UTC (permalink / raw)
  To: MMM, Lttng-dev, Houssem Daoud

On 2017-11-30 12:51 PM, MMM wrote:
> 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

> 
> On Thursday, November 30, 2017, 7:15:21 PM GMT+3:30, Julien Desfossez
> <jdesfossez@efficios.com> wrote:
> 
> 
> On 2017-11-30 10:13 AM, MMM via lttng-dev wrote:
> 
>> 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.
> 
> 
> 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
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-30 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1968389067.5193789.1512054837510.ref@mail.yahoo.com>
2017-11-30 15:13 ` Problem in Tracing C Program MMM via lttng-dev
     [not found] ` <1968389067.5193789.1512054837510@mail.yahoo.com>
2017-11-30 15:45   ` Julien Desfossez
     [not found]   ` <78c5dc0c-f6d4-448e-2562-5c282e5ac538@efficios.com>
2017-11-30 17:51     ` MMM via lttng-dev
     [not found]     ` <1222277784.5319970.1512064280572@mail.yahoo.com>
2017-11-30 18:57       ` Julien Desfossez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.