Ada_Ru форум

Обсуждение языка Ада

profilers

Оставить новое сообщение

Сообщения

Maxim Reznik
profilers
2009-06-24 09:27:57

Привет

 

http://www.ada-ru.org/profilers

 

Вот небольшой обзор профайлеров, который я подготовил

к прошедшей недавно школе-семинаре по высоким информационным

технологиям

 

Может кому будет полезно.

 

--

Maxim Reznik

 

День добрый!

Для меня полезно. Давно хотел заняться этим.

 

With best regards

Sergey Kirkorov www.mediascan.by

Email: ksiby@...

 

----- Original Message ----- From: "Maxim Reznik" <reznikmm@...>

To: <ada_ru@yahoogroups.com>

Sent: Wednesday, June 24, 2009 12:27 PM

Subject: [ada_ru] profilers

http://www.ada-ru.org/profilers

 

Вот небольшой обзор профайлеров, который я подготовил

к прошедшей недавно школе-семинаре по высоким информационным

технологиям

 

Может кому будет полезно.

 

Не раскрыт вопрос профайлинга многопоточной программы. В т.ч. средствами Ады.

 

День добрый!

По всей видимости здесь есть проблемы для подхода с gprof, по крайне мере для моей программы с ТАЙЛИНГАМИ под Windows XP sp2. Другие не проверял, т.к. они под Linux. Задачу пересобрал под GNAT GPL 2009. Нормально отработала только часть где не было задач, ни одна задача самостоятельно не завершилась, похоже они создались но управление так и не получили (мое предположение). Завершил аварийно через Ctrl+C. Gmon.out сформировался, отчет в конце письма.

P.S. Если у Максима есть возможность прогнать эту программу (она должна была быть на флешке) под Linux было бы интересно посмотреть результаты, возможно станут понятны причины ее работы с ключом "-pg".

 

With best regards

Sergey Kirkorov www.mediascan.by

Email: ksiby@...

 

----- Original Message ----- From: "Alexey Veselovsky" <alexey.veselovsky@...>

To: <ada_ru@yahoogroups.com>

Sent: Friday, June 26, 2009 8:25 AM

Subject: [ada_ru] Re: profilers

 

 

http://www.ada-ru.org/profilers

 

Вот небольшой обзор профайлеров, который я подготовил

к прошедшей недавно школе-семинаре по высоким информационным

технологиям

 

Может кому будет полезно.

 

Не раскрыт вопрос профайлинга многопоточной программы. В т.ч. средствами

Ады.

 

 

Flat profile:

 

Each sample counts as 0.001 seconds.

% cumulative self self total

time seconds seconds calls s/call s/call name

99.51 14.70 14.70 13 1.13 1.13 _test__matr_multipl_ijkbl

0.17 14.72 0.03 125001 0.00 0.00 _test__matr_multipl_task

0.11 14.74 0.02 _system__tasking__ada_task_control_blockIP

0.05 14.74 0.01 _system__tasking__stages__activate_tasks

0.03 14.75 0.00 _system__secondary_stack__ss_allocate

0.03 14.75 0.00 _system__secondary_stack__ss_init

0.02 14.76 0.00 1 0.00 14.70 __ada_taling

0.02 14.76 0.00 __alloca

0.02 14.76 0.00 _system__soft_links__tasking__get_sec_stack_addr

0.01 14.76 0.00 _memcpy

0.01 14.77 0.00 _system__img_int__image_integer

0.01 14.77 0.00 _system__tasking__initialization__abort_defer

0.01 14.77 0.00 _system__tasking__initialization__task_lock__2

0.01 14.77 0.00 _system__tasking__stages__vulnerable_complete_master

0.00 14.77 0.00 13 0.00 0.00 _test__time_sec

0.00 14.77 0.00 1 0.00 0.00 _adainit

 

% the percentage of the total running time of the

time program used by this function.

 

cumulative a running sum of the number of seconds accounted

seconds for by this function and those listed above it.

 

self the number of seconds accounted for by this

seconds function alone. This is the major sort for this

listing.

 

calls the number of times this function was invoked, if

this function is profiled, else blank.

 

self the average number of milliseconds spent in this

ms/call function per call, if this function is profiled,

else blank.

 

total the average number of milliseconds spent in this

ms/call function and its descendents per call, if this

function is profiled, else blank.

 

name the name of the function. This is the minor sort

for this listing. The index shows the location of

the function in the gprof listing. If the index is

in parenthesis it shows where it would appear in

the gprof listing if it were to be printed.

Call graph (explanation follows)

 

 

granularity: each sample hit covers 4 byte(s) for 0.01% of 14.77 seconds

 

index % time self children called name

0.00 14.70 1/1 _main [2]

[1] 99.5 0.00 14.70 1 __ada_taling [1]

14.70 0.00 13/13 _test__matr_multipl_ijkbl [3]

0.00 0.00 1/125001 _test__matr_multipl_task [4]

0.00 0.00 13/13 _test__time_sec [20]

-----------------------------------------------

<spontaneous>

[2] 99.5 0.00 14.70 _main [2]

0.00 14.70 1/1 __ada_taling [1]

0.00 0.00 1/1 _adainit [21]

-----------------------------------------------

14.70 0.00 13/13 __ada_taling [1]

[3] 99.5 14.70 0.00 13 _test__matr_multipl_ijkbl [3]

-----------------------------------------------

625002 _test__matr_multipl_task [4]

0.00 0.00 1/125001 __ada_taling [1]

0.02 0.00 125000/125001 _system__tasking__stages__task_wrapper [5]

[4] 0.2 0.03 0.00 125001+625002 _test__matr_multipl_task [4]

625002 _test__matr_multipl_task [4]

-----------------------------------------------

<spontaneous>

[5] 0.2 0.00 0.02 _system__tasking__stages__task_wrapper [5]

0.02 0.00 125000/125001 _test__matr_multipl_task [4]

-----------------------------------------------

<spontaneous>

[6] 0.1 0.02 0.00 _system__tasking__ada_task_control_blockIP [6]

-----------------------------------------------

<spontaneous>

[7] 0.0 0.01 0.00 _system__tasking__stages__activate_tasks [7]

-----------------------------------------------

<spontaneous>

[8] 0.0 0.00 0.00 _system__secondary_stack__ss_allocate [8]

-----------------------------------------------

<spontaneous>

[9] 0.0 0.00 0.00 _system__secondary_stack__ss_init [9]

-----------------------------------------------

<spontaneous>

[10] 0.0 0.00 0.00 __alloca [10]

-----------------------------------------------

<spontaneous>

[11] 0.0 0.00 0.00 _system__soft_links__tasking__get_sec_stack_addr [11]

-----------------------------------------------

<spontaneous>

[12] 0.0 0.00 0.00 _memcpy [12]

-----------------------------------------------

<spontaneous>

[13] 0.0 0.00 0.00 _system__img_int__image_integer [13]

-----------------------------------------------

<spontaneous>

[14] 0.0 0.00 0.00 _system__tasking__initialization__abort_defer [14]

-----------------------------------------------

<spontaneous>

[15] 0.0 0.00 0.00 _system__tasking__initialization__task_lock__2 [15]

-----------------------------------------------

<spontaneous>

[16] 0.0 0.00 0.00 _system__tasking__stages__vulnerable_complete_master [16]

-----------------------------------------------

0.00 0.00 13/13 __ada_taling [1]

[20] 0.0 0.00 0.00 13 _test__time_sec [20]

-----------------------------------------------

0.00 0.00 1/1 _main [2]

[21] 0.0 0.00 0.00 1 _adainit [21]

-----------------------------------------------

 

This table describes the call tree of the program, and was sorted by

the total amount of time spent in each function and its children.

 

Each entry in this table consists of several lines. The line with the

index number at the left hand margin lists the current function.

The lines above it list the functions that called this function,

and the lines below it list the functions this one called.

This line lists:

index A unique number given to each element of the table.

Index numbers are sorted numerically.

The index number is printed next to every function name so

it is easier to look up where the function in the table.

 

% time This is the percentage of the `total' time that was spent

in this function and its children. Note that due to

different viewpoints, functions excluded by options, etc,

these numbers will NOT add up to 100%.

 

self This is the total amount of time spent in this function.

 

children This is the total amount of time propagated into this

function by its children.

 

called This is the number of times the function was called.

If the function called itself recursively, the number

only includes non-recursive calls, and is followed by

a `+' and the number of recursive calls.

 

name The name of the current function. The index number is

printed after it. If the function is a member of a

cycle, the cycle number is printed between the

function's name and the index number.

 

 

For the function's parents, the fields have the following meanings:

 

self This is the amount of time that was propagated directly

from the function into this parent.

 

children This is the amount of time that was propagated from

the function's children into this parent.

 

called This is the number of times this parent called the

function `/' the total number of times the function

was called. Recursive calls to the function are not

included in the number after the `/'.

 

name This is the name of the parent. The parent's index

number is printed after it. If the parent is a

member of a cycle, the cycle number is printed between

the name and the index number.

 

If the parents of the function cannot be determined, the word

`<spontaneous>' is printed in the `name' field, and all the other

fields are blank.

 

For the function's children, the fields have the following meanings:

 

self This is the amount of time that was propagated directly

from the child into the function.

 

children This is the amount of time that was propagated from the

child's children to the function.

 

called This is the number of times the function called

this child `/' the total number of times the child

was called. Recursive calls by the child are not

listed in the number after the `/'.

 

name This is the name of the child. The child's index

number is printed after it. If the child is a

member of a cycle, the cycle number is printed

between the name and the index number.

 

If there are any cycles (circles) in the call graph, there is an

entry for the cycle-as-a-whole. This entry shows who called the

cycle (as parents) and the members of the cycle (as children.)

The `+' recursive calls entry shows the number of function calls that

were internal to the cycle, and the calls entry for each member shows,

for that member, how many times it was called from other members of

the cycle.

 

Index by function name

 

[1] __ada_taling [9] _system__secondary_stack__ss_init [16] _system__tasking__stages__vulnerable_complete_master

[10] __alloca [11] _system__soft_links__tasking__get_sec_stack_addr [3] _test__matr_multipl_ijkbl

[21] _adainit [6] _system__tasking__ada_task_control_blockIP [4] _test__matr_multipl_task

[12] _memcpy [14] _system__tasking__initialization__abort_defer [20] _test__time_sec

[13] _system__img_int__image_integer [15] _system__tasking__initialization__task_lock__2

[8] _system__secondary_stack__ss_allocate [7] _system__tasking__stages__activate_tasks

Новое сообщение:
Страницы: 1

Чтобы оставить новое сообщение необходимо Зарегистрироваться и Войти