Closed Bug 1219166 Opened 9 years ago Closed 9 years ago

JS coverage generates an incorrect info file

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox44 --- affected
firefox45 --- fixed

People

(Reporter: Sylvestre, Assigned: nbp)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Generating js code coverage of Firefox, I had this file: -- 1445866819-1112-2.info -- TN:Compartment_5f7fc060bb3600 -- -- $ genhtml 1445866819-1112-2.info Reading data file 1445866819-1112-2.info genhtml: ERROR: no valid records found in tracefile 1445866819-1112-2.info
This probably means that we either recorded sources which had no associated scripts or scripts which have no associated sources [1]. In any case, this is unexpected and I will add assertions to hopefully find similar issues in the JS Shell and help catch similar issues in the browser. [1] https://dxr.mozilla.org/mozilla-central/source/js/src/vm/CodeCoverage.cpp?from=CodeCoverage.cpp#87-88,404-406
Assignee: nobody → nicolas.b.pierron
Comment on attachment 8684913 [details] [diff] [review] LCov: Prevent reporting empty compartments, and empty runtimes. Review of attachment 8684913 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/CodeCoverage.h @@ +29,5 @@ > { > public: > explicit LCovSource(LifoAlloc* alloc, JSObject* sso); > > // Wether the given script source object matches this LCovSource. preexisting, but spelling @@ +35,4 @@ > return sso == source_; > } > > + // Wether the current source is complete and if it can be flushed. spelling @@ +156,5 @@ > // the child process. > void maybeReopenAfterFork(); > > + // fill an array with the name of the file. Return false if we are unable to > + // serialize the filename in this array. inconsistent capitalization @@ +172,5 @@ > // we want to close the current file and open a new one. > size_t pid_; > + > + // Flag used to report if the generated file is empty or not. If it is empty > + // when the runtime is destroyed, as an empty file is not a valid LCov file. The last sentence in this comment is garbled.
Attachment #8684913 - Flags: review?(bhackett1024) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: