Posts

Showing posts from January, 2016

Clang reflector for Data Layout and OpenMP

Image
This is a Work in Progress related to a tool for analyzing C++ code. In particular two operations are of interest:
Extraction  of the memory layout of all the types used in a program, event std ones, for the purpose of accessing them without manual serialization. This means that only fully instantiated templates are reported.Extraction of the OpenMP statements in the program The output of the program is a JSON containing the information above. The implementation is based on CLang, specifically 3.7 due to the support of OpenMP, and the program itself is a CLang tool so it can accept all the CLang options.
The source code is on github: https://github.com/eruffaldi/yreflectcxx

Updated 2016-1-31: discussion about execution flow and added lines OpenMP Analysis The OpenMP static analysis is useful in the context of research about static scheduling of OpenMP program. This is also related to the paper we are going to present to the ACM SAC conference this April: Ruffaldi E., Dabisias G., Brizz…

OSX Command line exclusion of folders from Indexing or Backup

Build folders contains tons of files (built PCL, for example, is 7k files) and it is not typically needed to make Spotlight index them or Time Machine to backup them.

For both services it is possible to control exclusion from the User Interface but sometime we want to control them from the command line.
Indexing The fastest way to prevent indexing  of a directory tree is to add a file called ".metadata_never_index", for example via touch. Time Machine OSX provides a sticky way to set exclusion for the folder meaning that it works even if the folder is moved around. The operation is performed with:
tmutil addexclusion PATH
The sticky capability is obtained by writing a special attribute in the folder as it is visible with the xattr command. The attribute is "com.apple.metadata:com_apple_backup_excludeItem" with a special value.
Listing Exclusions Using mdfind it is possible to find all excluded paths:

mdfind "com_apple_backup_excludeItem = 'com.apple.backupd&#…