Thursday, October 9, 2008

Profiling Mozilla Build - No Progress: Need HELP

So, I've been trying to profile the mozilla build for the last 3 weeks, and it feels like I haven't gotten anywhere yet. I mean, I'm able to find out which files to look at, where the rules are, where the config files are, which config files are loaded, how their info is extracted and converted, but I'm still unable to actually TIME some of these process and how long the build spends on each directory/file/command.

The files I've looked at and what my understanding of these files are:

  • client.mk: used to calling all the necessary config files and building

  • mozconfig2configure: picks out the ac_add_options from the .mozconfig

  • configure.in

  • configure: calls on config, checks system, load cahce file, and create files/directories

  • rules.mk

  • mozconfig2client-mk: picks out the mk_add_options from the .mozconfig

  • mozconfig-find: finds the .mozconfig file



Instead of going straight into timing all the individual directory/file/command, I decided to just try timing how much time the configure file takes. So I went into client.mk, where configure is loaded. This is what frustrated me the most, I've literally spent many hours, trying to just put a single echo or print statement, but it's ALWAYS saying "missing operator" or something along that line. I've tried many ways but none of them seems to really work.

  • echo Testing

  • @echo Testing

  • echo "Testing

  • print Testing

  • print "Testing"

  • print("Testing")


What frustrates me more, is that I can't even tell what language it's actually written. Like for the other files, I can tell they're just shell scripts, which I've done a bit before so I can edit it. But client.mk or any other mk files...... I have no idea how to read or edit them.

I'm like really running out of ideas. I'm literally 2 steps away from what I wanted to do and yet, I'm having so much trouble trying to get through these 2 steps.

I've even tried wrapping the files up in a script to try timing it. It works, but it doesn't really do what I want to do. I've also researched on some of the profiling softwares out there, but either they don't do what I wanted, or I might have missed some really good ones that fits my project.

I'm at a total lost, I need some serious help. I wish I could just get a bit more pointers in how I can do this. What's even better is if someone can tell me exactly what I need to do or show me some samples so I can actually learn from it.

No comments: