1

Topic: How to receive the total text of the program?

In the program functions from libraries With / With ++ are used, therefore it is not clear where, for example, there is a storage selection.
I by means of Vtune Amplifier found out that in my multi-threaded program the main time is occupied with the operator new. Though appears to it there is no place (all the line long std:: string are declared before a cycle and the remaining all data of primitive types) is transferred in function under links, and.
Can as - that it is possible to catch "library" separation of storage without the resultant code?

2

Re: How to receive the total text of the program?

Assignment of one object to another is caused by the designer of copying.
P.S. Buy same Mejersa ([Most] Effective a C ++) - there all is popularly stated.

3

Re: How to receive the total text of the program?

AlekseySQL;
http://oroboro.com/overloading-operator-new/

4

Re: How to receive the total text of the program?

Found an error! I caused functions:

stoi
stol
stoll

Transferring char *, therefore there was an implicit conversion to std:: string (and storage selection). It was necessary to use analogs:

atoi
atol
atoll

5

Re: How to receive the total text of the program?

About implicit coercion of types at Mejersa too is...

6

Re: How to receive the total text of the program?

AlekseySQL wrote:

In the program functions from libraries With / With ++ are used, therefore it is not clear where, for example, there is a storage selection.
I by means of Vtune Amplifier found out that in my multi-threaded program the main time is occupied with the operator new. Though appears to it there is no place (all the line long std:: string are declared before a cycle and the remaining all data of primitive types) is transferred in function under links, and.
Can as - that it is possible to catch "library" separation of storage without the resultant code?

So and it is possible to look at a tree of calls and to find calls of all functions which most of all consume resources, and in Vtune Amplifier, and in MS Visual Studio Profiler:
[img=https://software.intel.com/sites/default/files/m/a/b/d/picture6.png]
[img=https://i-msdn.sec.s-msft.com/dynimg/IC361375.jpeg]

7

Re: How to receive the total text of the program?

AlekseySQL;
Still it is possible to make call interception malloc.

8

Re: How to receive the total text of the program?

Vasja Utkin, I and found an error (by means of Vtune Amplifier).
But nevertheless here only a tree of calls. And if any function is caused in me many times what place of a call is "hot". If to consider that in a tree the "intermediate" functions on call stack with the low price the situation becomes  tangled are not shown. Or as in my case: the tree shows function invocation, and it should not be caused at all (and after all it practically on a root showed to me, lowering the intermediate procedural stack...). An output: for simplicity of profiling it is necessary to write the simple code smile
I got used to broadcast 1 in which time of execution of each function and even is shown to each instruction. Clear business that in compiled code With ++ such will not be. But can eat any : after all knowingly there is a mode of the assembly "profiling"... Though in the instruction to Vtune Amplifier is written to use Realese - the assembly.

9

Re: How to receive the total text of the program?

AlekseySQL wrote:

And if any function is caused in me many times.

... That track that there happens.
/ ++ are fast because the developer himself tracks that to itself at a foot not to shoot. Forgotten and in parameters the brake on designers of copying is enough to catch of one.

10

Re: How to receive the total text of the program?

AlekseySQL wrote:

in which time of execution of each function is shown and even each instruction

now I work in 17th studio, there in  runtime on each line too is shown. And still sideways any  about productivity smile before them was not, I did not understand yet, hang, draw schedules any smile