Closed Bug 1393657 Opened 3 years ago Closed 3 years ago

Make profileserver.py able to load files across the repo

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(3 files, 1 obsolete file)

No description provided.
Comment on attachment 8900993 [details]
Bug 1393657 - Clean up imports in profileserver.py;

https://reviewboard.mozilla.org/r/172452/#review177724
Attachment #8900993 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8900994 [details]
Bug 1393657 - Reformat profileserver.py;

https://reviewboard.mozilla.org/r/172454/#review177726
Attachment #8900994 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8900995 [details]
Bug 1393657 - Use mozfile.TemporaryDirectory;

https://reviewboard.mozilla.org/r/172456/#review177728
Attachment #8900995 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8900996 [details]
Bug 1393657 - Copy files for PGO server to temp directory;

https://reviewboard.mozilla.org/r/172458/#review177730

::: commit-message-29fa1:7
(Diff revision 1)
> +Alternatively, we could map different filesystem paths to different
> +URI paths. I like keeping things static and simple. And feeding

Oh the irony, where mapping different filesystem paths to different URI paths is actually the simplest change:

httpd = MozHttpd(port=PORT,
                 docroot=os.path.join(build.topsrcdir, "build", "pgo"),
                 path_mappings={
                     'speedmeter': os.path.join(build.topsrcdir, "third_party", 'etc.'),
                 })

(and you can make path_mappings a global variable)

::: commit-message-29fa1:14
(Diff revision 1)
> +of variance in PGO profiles. I'd like to think that profiling is
> +smart enough to skip over functions waiting on a kernel I/O call
> +to complete and this isn't an issue. But PGO has surprised us before.

Obviously, anything that involves I/O can allow other threads to do stuff at a different time they would have done them if the I/O had taken more or less time.

Anyways, I think you should remove those two last sentences.
Attachment #8900996 - Flags: review?(mh+mozilla)
Comment on attachment 8900996 [details]
Bug 1393657 - Copy files for PGO server to temp directory;

https://reviewboard.mozilla.org/r/172458/#review177730

> Oh the irony, where mapping different filesystem paths to different URI paths is actually the simplest change:
> 
> httpd = MozHttpd(port=PORT,
>                  docroot=os.path.join(build.topsrcdir, "build", "pgo"),
>                  path_mappings={
>                      'speedmeter': os.path.join(build.topsrcdir, "third_party", 'etc.'),
>                  })
> 
> (and you can make path_mappings a global variable)

Wow - I didn't think it would be that easy. I should have looked at the code in more detail.

Do you want me to change it or stick with file copying?
Change it :)
Note that path mappings probably need to start with a /, and seeing the patch in bug 1356652, it would probably be '/js-input/speedometer' mapping into third_party/something
Attachment #8900996 - Attachment is obsolete: true
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/758077726592
Clean up imports in profileserver.py; r=glandium
https://hg.mozilla.org/integration/autoland/rev/46cb55bc06c8
Reformat profileserver.py; r=glandium
https://hg.mozilla.org/integration/autoland/rev/2c8f9c706b62
Use mozfile.TemporaryDirectory; r=glandium
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.