Profiling code with XCode
You can set when the profiler stops by opening the Record Options dialog by choosing the File menu and then Record Options.

From there you can set to stop recording after either a time limit (i.e. specified number of seconds) or window limit (i.e. record the last x seconds before you pressed the stop button).

The yellow gear and other icons there are used for marking which type of method it is. For example the yellow gear are system methods such as for example malloc (i.e. not part of your own source code). Your own source code would be displayed with a dark avatar icon.