eBPF vs. System vs. DTrace - dtrace

Which one is the main one going to be supported by CentOS going forward?
I am not an expert at any of these tools, so I would like to know which one I should learn much deeper.
Thanks

SystemTap or stap might be the one you want to try. Also checkout Brendan Gregg's blog. You will learn a lot there: http://www.brendangregg.com/overview.html

Related

A good C++ programming enviornment for Mac OS X

I have tried Xcode, textwrangler and Qt. I like textwrangler the best but it doesn't support C++, i.e. compiling, and checking syntax. Can you please recommend a good editor for me?
I didn't like Xcode because it guesses what function you are typing and it's not helping me learn the syntax.
I think you probably need to separate learning the language from learning a tool.
XCode is probably the best integrated development environment for the Mac and you will come to appreciate its autocompletion feature as it saves you a lot of typing!
If you really don't want it (and I suggest that you do!) then you can turn it off:
Goto XCode->Preferences->Text Editing
and uncheck 'suggest completions while typing'
Try Eclipse:
http://www.eclipse.org/downloads/
or
CodeBlocks:
http://www.codeblocks.org/
I just started learning C++ on a mac as well. I like using Xcode to write and run the program since it does a good job of organizing all of the files for the project. Also, it will make learning objective-c easy if that is ever a goal.
I do suggest turning off the auto complete and the live error detection to improve your learning and debugging skills. I turned both off and have struggled at times but I believe that it has increased my understanding.
Best of luck either way!

C++ with OpenCv OR C# with aforge.net

Now I have project about sign language recognition , so to accomplish this project I need to program image processing,detection,tracking,recognition phases....etc
I would like to know what is the best to use:
VC++ with OpenCv
or
VC# with aforge.net ?
Thanks in Advance :)
The short answer is, that is something only you know. Things to consider:
Operational: what do you know? do you know c++ and c# equally well? what do you feel most comfortable in? Are you primarily based on windows? Will your application to run mainly on windows?
Engineering: does it have to work in real time? how important is it that it works in real time? how many man hours do you have for this project?
Scientific: what methods do you plan to use? are you sure these methods will work or is there some trial and error required?
As you can see, there is no "best" in this type of things everything is a tradeoff, a balance between many competing needs.

What is a good way to edit C++ on Mac OS X?

I am a first year Comp. Sci. student and am looking for the best way to develop C++ on a Mac. I have Xcode and Textmate.
What are the benefits/negatives of each? Are there any better ones?
I am not a fan of having to use a whole project to run programs with Xcode. Is this the only way to do it, or am I mistaken?
Also, is there a way to change the default text that is included in a .cpp file in xcode?
What is a good way to edit C++ on Mac OS X?
With your head.
Try both. Text editors are a matter of personal taste. See the flames over vim vs. emacs that make the Sun look pale.
The only one that can tell you what is the best text editor for you, is you.
http://code.google.com/p/macvim/
I would dig in and learn vim (or emacs if you really want to).
EDIT: You've got 4+ years ahead of you in CS. I really would suggest learning vim or emacs especially when you are still in university.
With Xcode you can edit each file separately, without needing them to belong to a project. Also, you can look in /Developer/Library/Xcode/File Templates for the templates used by Xcode; feel free to take a whack at them as you find suitable.
I'm a huge fan of textmate. It gives you a lot of power but doesn't get in your way. You could also try Eclipse for C/C++
I almost exclusively use Textmate, but to be fair the decision to switch to Textmate (coming from codewarrior in OS 9 days), was mainly because the XCode editor (then named ProjectBuilder) was annoyingly slow at editing larger files.
I'm sure that changed a lot over the years, but I see no reason to switch so I don't.
That said, one thing where XCode really outshines Textmate is the integration of a debugger, when you're just starting to learn, I think having an integrated debugger will help you quickly understand what's going on with your code, and will be a great advantage...
If you've got Textmate, just try em both for a few months, you're a student anyway, you should have plenty of time
Netbeans is free, has great auto-completion for C++, Java and others. It's also cross-platform.
http://www.netbeans.org/downloads/
I am not a fan of having to use a whole project to run programs with Xcode. Is this the only way to do it, or am I mistaken?
Because MacOS X is built on top of Unix you have many development tools available to you that lie outside of XCode. Most notably with a good Terminal application you can develop directly with gcc, bypassing XCode altogether. In that case I'd recommend finding a source editor you're comfortable with, such as TextMate or one of the others recommended here. Using gcc directly gives you the rapid turnaround with little overhead you seem to be looking for.
I'm a huge fan of emacs, because:
1) It's extensible. Thousands of languages are supported, you have modes for editing XML, HTML, etc.
2) It's highly configurable. You can set your own key bindings, change indentation, etc.
3) It's powerful. It integrates easily with compilers, debuggers, it makes text editing really quick.
You can check vi, textmate or xcode too. They're all great editors. It all comes to which one works better for you.
I quite like Xcode. I'm not sure why you ruled it out. It's really not that complicated.
I recently used SublimeText it is nice and fast. Give it a try.

code browsing, refactoring, auto completion in Emacs

I recently switched to Emacs and still finding my way through it.
I code in C++ and was wondering what tools out there extend Emacs to support code browsing (finding a symbol etc), refactoring and code completion.
I have heard of:
cedet
etags
cscope
But I'm so confused about what I need. Some places say that cedet provides all of the functionality but other places say that I need to invoke etags for cedet to work properly.
Can someone clear this up for me? Do I need all of these tools?
Maybe you will find my article about Cedet useful. Cedet has support for etags, gtags, cscope and other tools.
But refactoring is missing. You may need to look into the Xrefactory tool (but it isn't free)
Cscope is very good as "find symbol" usage tool. It is very fast.
Etags will show you your class hierarchy and will help you to find method definition/declaration.
So these two tools are must have and they are independent.
Cedet. It is kind of replacement of these two tools above with additional features. So your choice either cscope/etags or cedet.
For refactoring, I started using emacs exclusively for this and related tasks after I read this article by emacs hacker Xah Lee.
For autocompletion, see this SO post. Personally, I've found yasnippet very helpful throughout the years.
gtags (http://www.gnu.org/software/global/) is also available and perhaps simpler to use.
Personally, I don't like cedet. It makes Emacs take an hour to load. The auto-complete feature has never worked quite right with me. I don't need its project-management nor its UML features.
The only thing I miss about it is the Emacs Code Browser, which is very useful but requires cedet
I would advice you to just use cscope and etags and see how you like them. You can install cedet later once you're more familiar with emacs.
I wrote a blog article about using Global/gtags and Speedbar for code browsing you might find useful... (I also thought CEDET was a bit slow... and extremely complicated to set up =)

C++ Code Profiler

Can anybody recommend a good code profiler for C++?
I came across Shiny - any good? http://sourceforge.net/projects/shinyprofiler/
Callgrind for Unix/Linux
DevPartner for Windows
Not C++ specific, but AMD's CodeAnalyst software is free and is feature-packed.
http://developer.amd.com/cpu/codeanalyst/codeanalystwindows/Pages/default.aspx
Gprof if you use gcc. It may not be user friendly but still useful.
Probably you will be interested in Intel VTune. Rather useful and allows to collect low-level events like cache misses which helps a lot in tuning.
Quantify (part of the IBM/Rational PurifyPlus package) is a very good profiler, but not exactly cheap. It is available on several platforms, too - I've used it on Solaris, Windows and Linux.
Depends on what you need to do:
Measure, so you can do regressions testing to see if changes in performance happened.
Find reasons for suboptimal performance and optimize them.
These are not the same.
For 1, use one of the recommended profilers.
For 2, the profiler I much prefer is one you already have:
http://www.wikihow.com/Optimize-Your-Program%27s-Performance
To see how this goes, check this out.
For C++, as for C# and any language that encourages layers of abstraction, those layers may or may not be good from a software engineering standpoint, but they can kill performance. Every method call is a detour in the execution of your program, and the style encourages you to nest those things, sometimes needlessly. Also the style discourages you from knowing or caring what goes on inside them. You may find them creating and deleting objects underneath at a rate and level of generality far beyond what your application really needs.
AQtime (for Windows)
If you are running a Premium version of VS 2010 then you get a profiler with it.
I've also used a couple of other free ones, but they don't compare to the on MS ships. Useful as a second opinion though.
If you have access to a Mac, then I recommend using Shark from the CHUD tools.
You can use the analyzer that´s in Sun Studio 12 on Linux or Solaris. Itś free. http://developers.sun.com/sunstudio/index.jsp
If you cannot locate DevPartner it is because we've moved under new ownership. Check us out on the Micro Focus website: http://www.microfocus.com/products/micro-focus-developer/devpartner/index.aspx. Shameless plug: I work on the DevPartner team. Our long awaited 64-bit versions of BoundsChecker and C++/.NET profilers ship on February 4, 2011. We've changed our pricing model so you can choose either the whole suite or just the performance profiler if that's what you need. Please check out the new DPS 10.5 release when it goes live!