|
31 | 31 | #include <vector>
|
32 | 32 | #include <algorithm>
|
33 | 33 | #include <cstring>
|
| 34 | +#include "optimizing/artist/filesystem_helper.h" |
34 | 35 | #include "optimizing/artist/artist_log.h"
|
35 | 36 | #include "optimizing/artist/modules/module_manager.h"
|
36 | 37 | #include "optimizing/artist/modules/trace/trace_module.h"
|
@@ -1532,17 +1533,21 @@ class Dex2Oat FINAL {
|
1532 | 1533 | soa.Decode<mirror::ClassLoader*>(class_loader_))));
|
1533 | 1534 | }
|
1534 | 1535 |
|
| 1536 | + |
1535 | 1537 | /* artist setup and module management */
|
| 1538 | + VLOG(artist) << "START ARTIST SETUP (dex2oat)"; |
1536 | 1539 |
|
1537 | 1540 | ArtistLog::SetupArtistLogging();
|
1538 | 1541 |
|
1539 |
| - VLOG(artist) << "START ARTIST SETUP (dex2oat)"; |
1540 |
| - |
1541 |
| - ModuleManager& module_manager = ModuleManager::getInstance(); |
| 1542 | + // TODO hardcoded for now... To fix this, we need to know what we are currently compiling (app, system server, boot.oat) |
| 1543 | + string base_path(FilesystemHelper::DEFAULT_APP); |
1542 | 1544 |
|
1543 | 1545 | // TODO eventually the modules should register themselves, e.g., from their own .so
|
1544 |
| - module_manager.registerModule("trace", make_shared<TraceModule>()); |
1545 |
| - module_manager.registerModule("logtimization", make_shared<LogtimizationModule>()); |
| 1546 | + ModuleManager& module_manager = ModuleManager::getInstance(); |
| 1547 | + auto trace_id = "trace"; |
| 1548 | + module_manager.registerModule(trace_id, make_shared<TraceModule>(FilesystemHelper::createForModule(base_path, trace_id))); |
| 1549 | + auto logtimization_id = "logtimization"; |
| 1550 | + module_manager.registerModule(logtimization_id, make_shared<LogtimizationModule>(FilesystemHelper::createForModule(base_path, logtimization_id))); |
1546 | 1551 |
|
1547 | 1552 | // initialize modules
|
1548 | 1553 | module_manager.initializeModules(dex_files_, class_loader_);
|
|
0 commit comments