Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Strange trace files after code generation! Are they generated by XText?(We are getting many trace files after generating code from our DSL.)
Strange trace files after code generation! Are they generated by XText? [message #1699720] Fri, 26 June 2015 07:39 Go to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
We have a DSL from which we generate C-Code (.c and .h files). The project build (especially on Windows platform) is very slow mainly due to refreshing and indexing (by Eclipse CDT) mysterious trace files.

Currently we don't know which part of the framework is responsible for generating these trace files (CDT, XText, Eclipse, whatever ...).

We were not able to analyse the content of the trace file, since none of the files appear at the file system.

The filename syntax is as follows:

For a C source code file "/project/src-gen/my_c_function.c" the following trace file gets generated: "/project/src-gen/.my_c_function.c._trace"

Does anybody know if XText is responsible for this ?
  • Attachment: traces.png
    (Size: 31.81KB, Downloaded 273 times)
Re: Strange trace files after code generation! Are they generated by XText? [message #1699732 is a reply to message #1699720] Fri, 26 June 2015 08:44 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Xtext produces such trace files if you have a generator that does so
explicitly. There is no code in Xtext that indexes these files somehow
during a build.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Strange trace files after code generation! Are they generated by XText? [message #1699751 is a reply to message #1699732] Fri, 26 June 2015 10:58 Go to previous messageGo to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
Thats good news.
Indexing is done by the CDT (as I mentioned in my original post) and this takes additional time.

I'm very curious on what's the purpose or content of these files and how to turn generation of trace files off.
Re: Strange trace files after code generation! Are they generated by XText? [message #1699847 is a reply to message #1699720] Sat, 27 June 2015 06:26 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

You may be interested in https://bugs.eclipse.org/bugs/show_bug.cgi?id=471103

I created a patch for CDT 8.6 (Luna version) that boosts the indexing speed significantly. The sources are available at https://github.com/kthoms/cdt/tree/cdt86_perf_index.


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Strange trace files after code generation! Are they generated by XText? [message #1699863 is a reply to message #1699751] Sat, 27 June 2015 18:09 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 26.06.15 12:58, Wolfgang Zeller wrote:
> Thats good news.
> Indexing is done by the CDT (as I mentioned in my original post) and
> this takes additional time.
>
> I'm very curious on what's the purpose or content of these files and how
> to turn generation of trace files off.

Hi Wolfgang,

the trace files contain the mapping from DSL files to generated code.
This is used for the navigation. I wonder why CDT tries to index _trace
files. Is this a known file extension in your environment?

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Strange trace files after code generation! Are they generated by XText? [message #1700135 is a reply to message #1699863] Tue, 30 June 2015 11:17 Go to previous messageGo to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
*._trace Files were associated with a "Trace File Viewer". We have no clue what this is or where it comes from. I have removed this file association, but this didn't help (see screenshot).

Another very strange thing is that the trace files (like the one shown in the screenshot) do not exist in the file system.

Is there a way to deactivate this trace file handling in the XText generator framework?
Re: Strange trace files after code generation! Are they generated by XText? [message #1700215 is a reply to message #1700135] Tue, 30 June 2015 20:30 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
On 30.06.15 13:17, Wolfgang Zeller wrote:
> *._trace Files were associated with a "Trace File Viewer". We have no clue what this is or where it comes from. I have removed this file association, but this didn't help (see screenshot).
>
> Another very strange thing is that the trace files (like the one shown in the screenshot) do not exist in the file system.
>
> Is there a way to deactivate this trace file handling in the XText generator framework?
>

Usually the files exist in the FS but are hidden by the project explorer
by default since their name starts with a '.'.

Also generating trace files needs to be enabled explicitly so I assume
your language impl does that on purpose. Make sure that your code
generator passes an instance of java.lang.String to the file system
access to suppress trace files.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Strange trace files after code generation! Are they generated by XText? [message #1700238 is a reply to message #1700215] Wed, 01 July 2015 06:45 Go to previous messageGo to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
Windows explorer definitely shows hidden files on my computer. I've checked this by manually creating a file with the same file name pattern as the XText trace files. I've checked this many times now and never saw a trace file generated by XText in the file system.

The next annoying thing is that none of our developers have a knowledge about the trace files in general, nor do they know how to switch trace file generation on or off.

We studied our workflow file and didn't find anything suspicious. Can I find further information regarding the trace files in the XText documentation?
Re: Strange trace files after code generation! Are they generated by XText? [message #1700241 is a reply to message #1700238] Wed, 01 July 2015 07:26 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Wolfgang,

Xtext does not put tracefiles into some hidden channel on your
filesystem. They may stem from somewhere else than.
You're right, there is no official documentation on the trace files or
their format.
I'm not sure how to proceed from here to solve your issue. You could
either debug it yourself starting from TraceRegionSerializer or drop me
a mail if you need professional support to resolve the issue.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: Strange trace files after code generation! Are they generated by XText? [message #1700349 is a reply to message #1700241] Thu, 02 July 2015 05:58 Go to previous messageGo to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
Many thanks for your support so far.

Debugging the code gave us some new information. Our generator does not create the trace files but the XText framework tries to access trace files for generated code during the build process. During this process, XText checks the existence of each trace file and if they do not exist, it simply continues.

The problem is that we are using Git (EGit) for our projects. For any reason, EGit wants to refresh the Git status of the trace files and produces nice "hangs" (sometimes minutes for a single "non-existing" trace file).

We have tried several patterns for the trace files in our .gitignore file with no positive effect.

Is there anybody outside who can help us to make at least a small step forward?
Re: Strange trace files after code generation! Are they generated by XText? [message #1700376 is a reply to message #1700349] Thu, 02 July 2015 08:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sounds like a bad bug. I would progress in two ways.

Load EGIT as source and profile to see where the time goes.

Use Wireshark to see if unexpected Internet traffic is occurring quite
possibly with long timeouts.

Regards

Ed Willink


On 02/07/2015 06:58, Wolfgang Zeller wrote:
> Many thanks for your support so far.
>
> Debugging the code gave us some new information. Our generator does
> not create the trace files but the XText framework tries to access
> trace files for generated code during the build process. During this
> process, XText checks the existence of each trace file and if they do
> not exist, it simply continues.
>
> The problem is that we are using Git (EGit) for our projects. For any
> reason, EGit wants to refresh the Git status of the trace files and
> produces nice "hangs" (sometimes minutes for a single "non-existing"
> trace file).
>
> We have tried several patterns for the trace files in our .gitignore
> file with no positive effect.
>
> Is there anybody outside who can help us to make at least a small step
> forward?
Re: Strange trace files after code generation! Are they generated by XText? [message #1700431 is a reply to message #1700376] Thu, 02 July 2015 14:32 Go to previous messageGo to next message
Wolfgang Zeller is currently offline Wolfgang ZellerFriend
Messages: 18
Registered: September 2013
Junior Member
Flight Recorder told us that most of the time is spent in
org.eclipse.jgit.fnmatch.FileNameMatcher.extendStringToMatchByOneCharacter(char)

[Updated on: Mon, 13 July 2015 10:43]

Report message to a moderator

Re: Strange trace files after code generation! Are they generated by XText? [message #1720974 is a reply to message #1700431] Fri, 22 January 2016 09:30 Go to previous messageGo to next message
pranay roy is currently offline pranay royFriend
Messages: 196
Registered: January 2016
Senior Member
Hi ,
I am unable to ignore these trace file from my git . I see these getting generated .

I used *.java._trace in gitignore. Any suggestion would be much appreciated.

Re: Strange trace files after code generation! Are they generated by XText? [message #1720978 is a reply to message #1720974] Fri, 22 January 2016 09:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
https://github.com/eclipse/xtext/blob/master/.gitignore

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Strange trace files after code generation! Are they generated by XText? [message #1797977 is a reply to message #1720978] Fri, 09 November 2018 12:43 Go to previous message
Ralf Mollik is currently offline Ralf MollikFriend
Messages: 4
Registered: November 2018
Junior Member
try

**/*.java._trace

Previous Topic:Testing Xtext Language Server for generic IDE
Next Topic:[Xbase] Problems with types and scoping in Xbase-based DSL
Goto Forum:
  


Current Time: Tue Mar 19 02:59:18 GMT 2024

Powered by FUDForum. Page generated in 0.03449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top