Skip to content

Commit a202060

Browse files
committed
Integrating the new fshelper from Project-ARTist/ARTist#16
1 parent 5d6c927 commit a202060

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,8 @@ set(SOURCE_FILES
11331133
tools/dmtracedump/createtesttrace.cc
11341134
tools/dmtracedump/profile.h
11351135
tools/dmtracedump/tracedump.cc
1136+
compiler/optimizing/artist/filesystem_helper.cc
1137+
compiler/optimizing/artist/filesystem_helper.h
11361138
compiler/optimizing/artist/modules/module_manager.cc
11371139
compiler/optimizing/artist/modules/module_manager.h
11381140
compiler/optimizing/artist/modules/module.cc

compiler/optimizing/optimizing_compiler.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <stdint.h>
2424
#include "optimizing/artist/method_info_factory.h"
2525
#include "optimizing/artist/modules/module_manager.h"
26+
#include "optimizing/artist/filesystem_helper.h"
2627

2728
#ifdef ART_ENABLE_CODEGEN_arm
2829
#include "dex_cache_array_fixups_arm.h"

dex2oat/dex2oat.cc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <vector>
3232
#include <algorithm>
3333
#include <cstring>
34+
#include "optimizing/artist/filesystem_helper.h"
3435
#include "optimizing/artist/artist_log.h"
3536
#include "optimizing/artist/modules/module_manager.h"
3637
#include "optimizing/artist/modules/trace/trace_module.h"
@@ -1532,17 +1533,21 @@ class Dex2Oat FINAL {
15321533
soa.Decode<mirror::ClassLoader*>(class_loader_))));
15331534
}
15341535

1536+
15351537
/* artist setup and module management */
1538+
VLOG(artist) << "START ARTIST SETUP (dex2oat)";
15361539

15371540
ArtistLog::SetupArtistLogging();
15381541

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);
15421544

15431545
// 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)));
15461551

15471552
// initialize modules
15481553
module_manager.initializeModules(dex_files_, class_loader_);

0 commit comments

Comments
 (0)