Closed
Bug 1219166
Opened 9 years ago
Closed 9 years ago
JS coverage generates an incorrect info file
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: Sylvestre, Assigned: nbp)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
8.17 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•9 years ago
|
||
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 | ||
Updated•9 years ago
|
Assignee: nobody → nicolas.b.pierron
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8684913 -
Flags: review?(bhackett1024)
Comment 3•9 years ago
|
||
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+
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•