DTrace integration and quick start
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 199 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/32513 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 2014100 / 199
2
3
10
11
12
13
14
17
18
19
23
24
25
27
29
45
46
47
48
49
50
51
52
55
56
57
58
65
67
68
70
72
74
75
76
77
78
79
81
82
84
86
87
89
90
93
94
100
101
102
103
104
106
107
109
110
111
112
113
114
115
119
122
123
124
126
127
128
129
137
139
141
143
145
147
150
154
155
158
161
163
164
165
166
168
171
174
175
176
179
182
183
185
188
190
191
192
194
195
196
00:00
Scripting languageState of matterEscape characterKeyboard shortcutFunctional (mathematics)Endliche ModelltheorieOrder (biology)CodeRight angleResultantCodeCartesian coordinate systemContent (media)Computer programmingFormal languageInformationFunction (mathematics)Library (computing)Plug-in (computing)Slide ruleBitRun time (program lifecycle phase)BytecodeDatabaseSheaf (mathematics)Kernel (computing)Line (geometry)Computer configurationLengthSoftware testingInternet service providerInternetworkingLink (knot theory)ExistenceIntegrated development environmentDifferent (Kate Ryan album)Process (computing)Tracing (software)Physical systemFreewareTheoremSpacetimeScaling (geometry)Client (computing)Connected spaceComputing platformDevice driverMultiplication signSoftware developerCountingRevision controlLevel (video gaming)MathematicsStability theoryContext awarenessTouch typingAttribute grammarData structureSemiconductor memoryCore dumpSinc functionProfil (magazine)Computer fileEmailEqualiser (mathematics)Demo (music)TimestampSpecial functionsParameter (computer programming)Variable (mathematics)WritingRadical (chemistry)Patch (Unix)NumberCoprocessorString (computer science)Object (grammar)Traffic reportingGroup actionEvoluteInterface (computing)Mereology2 (number)System administratorLetterpress printingFault-tolerant systemPresentation of a groupGodInteractive televisionSource codeWordVideoconferencingRing (mathematics)DialectRegulator geneMotion captureSelf-organizationComputer architecture3 (number)QuantumLimit (category theory)Form (programming)Distribution (mathematics)Execution unitVarianceDemosceneIterationQuicksortGame controllerTensorVideo gameQuantificationReverse engineeringVideo projectorSolid geometryProduct (business)Total S.A.Element (mathematics)Field (computer science)NeuroinformatikSerial portHypermediaSystem callInheritance (object-oriented programming)Workstation <Musikinstrument>Strategy gameCuboidRange (statistics)Normal (geometry)Real numberTupleIntegerLogic gateReading (process)RootDeterminantStatement (computer science)Grand Unified TheoryPhysical lawWeightOpen setArithmetic progressionXMLLecture/ConferenceUML
Transcript: English(auto-generated)
00:00
If you want to write a script, you can see many different scripts in this docute, in fact. Terminology. Ditrace has a terminology with prop, provider, and model. Prop is a shortcut inside your code,
00:22
and you will trace that in writing in functions. Provider is object, logical object, which contains many different props. Model is name of application or kernel.
00:41
It's a short theorem of how it works. In user space and kernel space, you do different kernel model audit in the kernel. And different providers also in the kernel work via libditrace lib, and also librock.
01:01
And we combine two Ditrace providers. It's available providers on FreeBSD. Many different platforms depend by kind of providers, because not ported yet on many different systems. Linux has a few, and FreeBSD, and Savaris,
01:23
and O6 has many different providers to trace drivers and another. This is, you can run a main one, and see command line content. It's a big program to compile it and allow the application, which written a D language.
01:45
It's compiled to bytecode and to open kernel, which collect information and output in your terminal. And support it in many different platforms. But on O6, it's a bit patched.
02:01
You need to run Ditrace to generate a bytecode, which added to binary section, which after run, will load in the kernel. This is first running application, Ditrace L. If you run, you will see many different providers, which
02:22
are available in your system. Also, you can run Ditrace L and a flag-n. And Ditrace, we see our available providers and functions. It's like ack, and start, and begin.
02:41
D language isn't D language, as we usually use. It's D language Ditrace. It uses it as ack, which has a provider, module, function, and prop. Also, predicates this statement, like if in C.
03:07
And actions are like C, written code, structures, and another. R is super detailed. Here's the application. If you run Ditrace, C scale, open entry,
03:20
you will see which application opened a file just now. It tick one second, every one second. All data will copy it from kernel space to user space. It's need to use to save many different things
03:42
to change context between user space and kernel space memory. To save your time, if you run a TCP dump, you will see in top TCP dump has many different resource will busy, because it will copy from kernel to user space.
04:06
You can write a profile with different tick, and you get how often you want to see output. You'll see variable.
04:22
I read a few interesting variable from Ditrace, which included in language. You can see ack, also prop, prop. You can get name of function or name of provider via prop prop.
04:42
And timestamp is very interesting. If you use a timestamp, you will get a timestamp from starting and ending. Execute your code. If you use vtime stamp, it will on CPU. It's only which data will work.
05:03
Without time, spend it on usage with Ditrace code only for execute functions, aggregate functions. You can write aggregate to see how many different ways.
05:21
Count, scatter, sum, average, and quantilize your calls and another. Phrasing applications. You can trace application via Ditrace provider. Ditrace provider is very interesting thing to look at your application.
05:42
If your application build it without user when statistically defined traces, without modified code with Ditrace, you can see what it does. We have Ditrace provider. It works on FreeBSD via libprog. And you will see which functions were scaled.
06:03
For example, if you use MySQL, you can see what's request from client to MySQL and get information by connect without modification of code. If you have a web, you can don't.
06:21
My code is special code, which I've written for presentation and see different. I don't know internet exists. This is not a bit rest. You will know.
06:52
Can I start? OK.
07:14
OK. Ready? OK. This is first program.
07:21
If you see, I write it green. This is lines for this simple code for length of fast and slow functions to see how many long time it does. It's pretty simple code.
07:41
It's that special for looks at code and find troubles. This is first provider via bit provider without modification code. You run a bit, and then dollar target. Target is number of processor bit.
08:04
And length and entry, you will see information from string. If you will copy in this there, argument zero is first argument. And you will get a timestamp. And self TS is self is object for functions.
08:23
You can write it to find difference between times. This is next part. It is end of coder. And that we will collect it in array and count.
08:41
And also, we will count twice a code to see quantities, how many long, depended by length of string to see output.
09:03
Profile, one time per 10 seconds, and then exit. It works 10 seconds, and then show output from end is like AFK syntax. This is result. And it was count six fast and six slow lines
09:27
with two functions. How this is distribution, which can be quantized. And you can see how long and how much lines was collected.
09:50
It's very fast and very slow. First, user can define your providers
10:03
since you're coding. You need to write a simple file in D language. And then generate a header file and add the prop, start, and stop, or a different way, which function what it traces. You can add arguments, structures, and another.
10:26
After run application, you write it some code, which contain a Microsoft demo start, enable it, demo start, and demo stop, enable it, and demo stop. And you will run and include your code.
10:45
And you will see when your function started and when it caused execution. Compilary applications defined by system. If you use a free BSD, Soraris, Linux, NetBSD, QNX,
11:02
you will need runs duties to generate object, which we will attach on your bytecode in section sunv in your binary, which will hold in kernel when you run application.
11:23
It will hold data before application and execute main function in your code. And then the subject in one binary, that's all. In the first script, if you don't have files,
11:42
you can see that D2S supported many different options. So many options, I'm not going to talk about that. It's a short introduction. And you are probably still available if you run D2SL
12:04
and add name of application as m-m. And you will get available providers and props. And you can collect data without big provider. It will count in your kernel without different modification
12:25
of code. This is the second demonstration. It's supporting arguments. You can write a string, int, int64, and structures, and any different kind of variables.
12:46
You can see the documentation and also dependent by system to see what you want. And then same steps to get a working code. This is a bit modification.
13:01
I highlighted a red is bit function, a smart function to very slow code for collecting data and see difference between code because code's so fast. And this is D2S code, which started to start in timestamp,
13:25
change timestamp to zero, and print of when started application. And also as preview, collecting data and need to copy in this special function for getting from kernel to user space
13:43
data with lines and strings, and then print it the same as preview. The difference is resolved by execution.
14:03
You also can evolution your interface if your interface is unstable. You want to know, and many different admins or developers want to see which kind of version of and how it work,
14:26
and what stage and support you write stability with special pragma options and your touch attributes. And this is the code also showing
14:41
how to work with structures. This is structure to see what code does. And this is first library in the trace. You need to move that library in your dash user dash lib dash trace.
15:01
And in the trace, it will be able to script it in this path. And after run, you can translate your code your C functions arguments to the trace and show in code.
15:24
And then you can get it from short code in the trace. That's all. Like it is on the structures and results.
15:42
Also, if you application a little more convenient to writing code and rubbing on JS and URL, you want to see what your code does. But libd2 is supported via libd2 is special external library.
16:08
And I integrated that in NoScale database, which uses OAuth scripts. And it's named as Taranto.
16:23
It's NoScale in memory-like release, but supported in different plugins and a bit popular in Russia. You also don't want files, but it is a few slides I can fast build it.
16:42
You can write your providers and start it after running code. And you can stop at runtime. You need to get code, C code, only for functions inside database. This is a big example of a function which
17:07
showed also lines and which lines and their length and reference more information, big list of presentation,
17:22
and any questions if you have. OK, that's all. That's all.
17:49
Test codes. You can download from a link. Is that OK? I can't because my environment was saved on my previous job.
18:06
And that's after changing the job. But you can download and see with me it will work perfectly. Any questions?
18:22
OK. For FreeBSD, I recommend to use a detrace toolkit to see what your applications does.
18:44
It's pretty easy to understand, and you can write shortcuts and see many different codes to see in PHP. My friends uses in PHP, and I'm interested in integrating applications and more developers and looking for code to administrate it.
19:56
Yeah. Also, you can write in Apple Instruments,
20:01
attach its external props, and see what will application do in future, and collect data, and see what you see in your code on your functions if you're interested in it. Who is next?
20:46
Oh, I can't answer this question because who is written detrace is his guy and many different freebies developers, supporting our content, added new features.
21:01
And when I did that presentation, I found around $5 or $7 in the kernel modulus and reports that. And it will fix it, but it not fix it yet in 10. It fix it in 10 stable, not in your release.
21:25
I know you can write Mark Johnson to more information. That's all.
21:46
OK. Thank you.
22:28
Good morning. Good morning. Ah, cool. Please take out your trash when you leave the room. The next talk will be at 1 PM, so in 35 minutes.
26:23
Thank you, sir. How is this?