Oh, I just follow your given algorithm and implement it:
> 1. Get profiles count
> 2. Get first profile const CpuProfile* profile = nan_isolate->GetCpuProfiler()->GetCpuProfile(0);
> 3. Get id of this profile. If id === args[0]->Uint32Value() return this profile, else repeat this step in loop for each index < count on profiles

I also think this is not necessary.