Bug 545444 - importing xdebug cachgrind files (for the PHP profiler) doesn't work anymore
Summary: importing xdebug cachgrind files (for the PHP profiler) doesn't work anymore
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-15 09:06 EDT by Thierry BLIND CLA
Modified: 2020-05-14 10:16 EDT (History)
1 user (show)

See Also:


Attachments
an example of non-working (and untouched) cachegrind file (209.53 KB, text/plain)
2019-03-15 09:08 EDT, Thierry BLIND CLA
no flags Details
same cachegrind file, but working after my 2 manual fixes (191.54 KB, text/plain)
2019-03-15 09:10 EDT, Thierry BLIND CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry BLIND CLA 2019-03-15 09:06:14 EDT
Hi,
I've tried to import recent cachegrind files (generated by xdebug 2.6.0) in the Profiling Monitor view, but all imports fail with following exception:

java.nio.file.InvalidPathException: Illegal char <:> at index 3: php:internal

	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at sun.nio.fs.WindowsPath.parse(Unknown Source)
	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
	at java.nio.file.Paths.get(Unknown Source)
	at org.eclipse.php.profile.core.data.ProfilerFunctionData.setFileName(ProfilerFunctionData.java:102)
	at org.eclipse.php.profile.core.data.ProfilerFunctionData.<init>(ProfilerFunctionData.java:44)
	at org.eclipse.php.profile.core.engine.cachegrind.CacheGrindModelParser.finishCurrent(CacheGrindModelParser.java:311)
	at org.eclipse.php.profile.core.engine.cachegrind.CacheGrindModelParser.buildModel(CacheGrindModelParser.java:281)
	at org.eclipse.php.profile.core.engine.cachegrind.CacheGrindModelParser.build(CacheGrindModelParser.java:402)
	at org.eclipse.php.profile.ui.wizards.ImportSessionWizard$1.run(ImportSessionWizard.java:57)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

A simple fix is to edit the problematic cachegrind file and:
- remove all \r characters (I'm not sure that they are correctly handled by class CacheGrindParser)
- replace line "fl=(1) php:internal" by "fl=(1)"

After those 2 fixes, the file can be imported again.

I'll provide an example of cachegrind file.

Thierry.
Comment 1 Thierry BLIND CLA 2019-03-15 09:08:41 EDT
Created attachment 277883 [details]
an example of non-working (and untouched) cachegrind file
Comment 2 Thierry BLIND CLA 2019-03-15 09:10:27 EDT
Created attachment 277884 [details]
same cachegrind file, but working after my 2 manual fixes
Comment 3 Eclipse Genie CLA 2019-04-09 15:32:11 EDT
New Gerrit change created: https://git.eclipse.org/r/140325
Comment 5 Thierry BLIND CLA 2019-04-10 11:46:18 EDT
Hi Dawid,
this bug is still not resolved.

Please read carefully my bug report again (the "php:internal" problem) and try file provided as attachment in Comment 1: https://bugs.eclipse.org/bugs/attachment.cgi?id=277883

Thierry.
Comment 6 Dawid Pakula CLA 2019-04-10 12:28:53 EDT
Strange. On mac os both attachments works fine now. Could you send me oroginalnfiles? Maybe bugzilla changed something.
Comment 7 Thierry BLIND CLA 2019-04-10 13:28:05 EDT
(In reply to Dawid Pakula from comment #6)
> Strange. On mac os both attachments works fine now. Could you send me
> oroginalnfiles? Maybe bugzilla changed something.

Ok, I've sent them to your email address :)
Comment 8 Eclipse Genie CLA 2019-04-13 07:19:25 EDT
New Gerrit change created: https://git.eclipse.org/r/140535