O que é Tracing?

All, Tools

Introducao basica – o que eh tracing?

Gravacao de eventos .

Nao eh logging, pois esta ligado a eventos em baixo nivel e muito mais rapidos nao sendo tambem profiling 

Pode ser no lado em eventos de usuario e eventos do kernel.  A gravacao eh feita em runtime e portanto ha uma interferencia, que é chamada de overhead. O numero de eventos gravados tambem varia, ocorrendo por vezes perda de alguns eventos a depender da ferramenta de tracing.

     Basicamente o que deve ser feito?

Rodar o aplicativo, ligar o trace e fazer a analise.

Ferramentas

LTTNG

Eh um tracing dos eventos do kernel e dominio usuario com baixo overhead.

Eh possivel analisar apenas alguns eventos do kernel ou todos os eventos, assim como eh possivel fazer a analise de eventos padrao no kernel ou criar pontos de tracing no proprio codigo (aplicativo) para fazer a gravacao.

Para fazer a analise dos traces, eh necessaria a ferramenta de analise dos traces, que pode ser o BabelTrace, ou o TraceCompass. É desenvolvido pela EfficiOS.

Dtrace

É um framework para analises de performance e deteccao de erros que eh incluso por padrao em diversos sistemas operacionais, incluindo Solaris, Mac OS X and FreeBSD.

perf

É uma ferramenta para profiling para Linux 2.6+. Um interessante tutorial pode ser encontrado aqui: https://perf.wiki.kernel.org/index.php/Tutorial

strace

É uma ferramenta para debbuing e diagnostico Pode alterar sua aplicacao a medida que usa ptrace no kernel, tendo um overhead grande.

   ftrace

É um framework para tracing em Linux desenvolvido por Steven Rostedt e que foi incorporado ao kernel do Linux.

Conference Rv 2015 – Vienna

All

Intro

After starting my graduate studies with Prof Michel, at Polymtl, I came to notice the RV 2015 conference related to Real-Time verification, which tracing is a branch actually. I entered in contact with Prof Ezio B. and he provided the invitation.

Austria

Austria is a great country, it was my first time there and I really loved it. Really really special!

RV conference

The conference was excellent. It gave me many ideas and stuff to look for. I got my contact also, conferences are good in this sense.

After coming back to the lab I created a presentation [1]

REFs

[1] https://1drv.ms/p/s!ArPtYRnM1EFptEANdpwY8ahrd0UH

 

Java 7 features

All

Intro

Preparing myself here for some interviews and reading about Java, I came to review some features that were added to Java 7 and Java 8. First, let start with J7:

Java 7 features

Diamond operator

The diamond operator is a way to facilitate the declaration of variables, saving time and makes the code less confusing.

Map<String, List<Trade>> trades = new TreeMap<String, List<Trade>> ();
Map<String, List<Trade>> trades = new TreeMap<> ();

 

String in the switch statement:

switch(status) {
    caseX:  x();
    caseY:  y();
    default:
            do_something()
}

try optimization

No need to use the finally mandatorily as before we can do only:

   try(){

} catch(Exception){

}

Exception handling at the same time

   try(){

} catch(Exception1 | Exception2 | Exception3){

}

Path

It’s so useful just use path, get the file and use it.

WatchService

I didn’t know about this feature, which is quite interesting btw. You can basically look at the file changes modification and be notified by it. Cool. But you actually need to create a service to watch the file.

WatchKey key = watchService.take();

invokedynamic Feature

Called Java secret weapon [2]. Interestingly to learn about this I watched [3], describing the use of invokevirtual – which you can see it on bytecode.

This is a feature that is explored much more in J8[4]

It enables the use of dynamic languages above the JVM. I will create a separated article about it later.

REFs

[1] https://www.oreilly.com/learning/java7-features

[2]https://www.infoq.com/articles/Invokedynamic-Javas-secret-weapon

[3] https://www.youtube.com/watch?v=262lTMIpYQE

[4] https://www.youtube.com/watch?v=0vfFHMGESVQ