Fix sprofile_init and document it