Valentin Pasquale
email: valentin.pasquale@ens-lyon.fr

Isabelle Puaut
email: isabelle.puaut@irisa.fr

Winston: Revisiting iterative compilation for WCET minimization

Keywords: WCET estimation, compilation, compiler optimizations, iterative compilation

 has shown that it is also possible to use existing optimization and iterative compilation techniques to lower the WCET estimates drastically.

, which, on the same benchmarks and experimental conditions, reduce the WCET estimates by 20% on average.

for real-time systems. Some of them may complicate static WCET estimation. For example, they can make loop-bound estimation impossible. Some optimizations may also worsen the WCET estimate, whereas it improves the average-case execution time. The sequence of optimizations that minimize the WCET estimate of a code is therefore not necessarily the same as the one minimizing average-case performance [START_REF] Falk | A compiler framework for the reduction of worst-case execution times[END_REF], motivating research on WCET-oriented compilation.

Compilers come with standard optimization levels (-O1 to -O3, -O0 meaning non-optimized code). Previous work in the compiler community has shown that better performance than the one obtained with the -O3 level can be obtained by using iterative compilation [START_REF] Bodin | Iterative compilation in a non-linear optimisation space[END_REF][START_REF] Chen | Deconstructing iterative optimization[END_REF][START_REF] Gg Fursin | Evaluating iterative compilation[END_REF][START_REF] Kisuki | Iterative compilation in program optimization[END_REF]. Iterative compilation techniques generate many program versions with different sequences of optimization flags. The different program versions are then executed and their execution time is measured to choose the sequence with the lower execution time. The number of different optimization flags in compilers (more than 100 in gcc) is large, and therefore the number of possible optimization sequences is huge, in particular, given that the same optimization flag can appear several times in a sequence. Metaheuristics (e.g., genetic algorithms) or machine-learning-based algorithms, given the enormous size of the search space, are appropriate techniques to generate sequences of optimization flags based on previously tested sequences. Previous research on iterative compilation has shown that the optimization sequences that minimize execution time are application-dependent, making standard optimization levels -O1 to -O3 sub-optimal. Moreover, an optimization sequence well-suited to one code is not necessarily well-suited to other types of code. Finally, the huge size of the optimization space makes it difficult to manually introspect for optimization sequences that are well suited to a given code.

The fundamental difference between standard (performanceoriented) iterative compilation and WCET-oriented iterative compilation is that the metric to be optimized for the latter is the WCET. As the exact WCET of a given code is in general unknown, an upper bound of the WCET, the WCET estimate, is produced instead. Static WCET estimation tools have to infer flow information (e.g., loop bounds, infeasible paths) to estimate WCETs. It may happen that certain sequences of optimization flags while resulting in significant performance improvement, strongly affect the structure of the code and render static WCET estimation tools unable to accurately (or simply) infer flow information. WCET-oriented iterative compilation not only determines the sequence of optimization flags that results in the lowest WCETs, but also excludes optimization sequences that render the tools unable to estimate WCETs accurately or simply estimate them.

The use of iterative compilation for minimizing WCET estimates instead of average execution times was extensively explored in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]. A new technique was proposed in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] to generate optimization sequences based on learning the impact of individual optimization passes on the WCET estimate. In this paper, we propose Winston, for Wcet mInimizatioN uSing iTerative cOmpilatioN, a new technique for WCET-oriented iterative compilation that outperforms [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] both in terms of complexity and WCET reduction. The better behavior of Winston as compared to [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] is based on: (i) the observation that very long optimization sequences result in lower WCET estimates than the ones produced by [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]; (ii) the introduction of a cache, that avoid re-calculating the WCETs several times for the same optimization sequences, and therefore allows to better explore the optimization search space, for a given search time budget; (iii) the proposal of a new algorithm for searching optimization sequences results, well suited to the use of long optimization sequences.

Note that given the huge size of the search space of optimization sequences, Winston is a best-effort algorithm. Winston does not guarantee finding the optimal optimization sequence, which would require an exhaustive search space traversal.

The contributions of this paper are the following:

• We show that the use of long chains of compilation options, from a few hundred to a few thousand, allows a significant reduction of WCET estimates. These long chains of compilation flags can afterward be shortened by safely removing useless flags. • We show that using a cache of previously analyzed optimization sequences speeds up the search for the sequence that results in the lower WCET estimate. • We present a new algorithm, named Winston, for Wcet mInimizatioN uSing iTerative cOmpilatioN, that iteratively generates long and varied optimization sequences. • We give an extensive performance evaluation of Winston, using the same experimental setup as in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] (benchmark suites, WCET estimation tool -aiT [START_REF] Online | aiT:the industry standard for static timing analysis[END_REF] -, target processor -LEON3). Experimental results show a reduction of WCET estimates of 35% on average and up to 70% on some benchmarks, compared to the best compilation level applicable. These gains are far better than the WCET reductions obtained by [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], which, on the same benchmarks and experimental conditions, reduce the WCET estimate by 20% on average.

The outline of this paper is as follows. Section 2 first presents the general workflow of WCET minimization using iterative compilation as defined and implemented in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]. Section 3 presents preliminary findings, in particular the fact that long optimization chains allow for a drastic reduction of WCET estimates for some codes. We present in Section 4 Winston, a new iterative compilation algorithm that aims at reducing WCET estimates based on these preliminary findings. An experimental evaluation of Winston is presented in Section 5. We compare Winston to related work in Section 6 and give concluding remarks in Section 7.

BACKGROUND ON WCET-ORIENTED ITERATIVE COMPILATION

The typical workflow of WCET-oriented iterative compilation, as defined and used in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], is depicted in Figure 1. Given a program in a high-level language and a compiler (LLVM) for the target architecture (LEON3), the approach first compiles the program and analyzes it with a WCET estimation tool (the industry-standard WCET estimation tool aiT [START_REF] Online | aiT:the industry standard for static timing analysis[END_REF]). Subsequently, a new optimization sequence is generated. The program is then recompiled and analyzed, resulting in a new WCET estimate. This iterative process is repeated until a given number of calls to the WCET estimation tool aiT has been made. In [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], no flow information is manually given to aiT to augment the precision of WCET estimation. This choice was taken because compiler optimizations modify flow information. Therefore, manually-provided flow information could be incorrect unless a traceability mechanism such as the one proposed in [START_REF] Li | Traceability of flow information: Reconciling compiler optimizations and WCET estimation[END_REF], which unfortunately is not available in standard compilers, is used. Thus, some WCET estimates may not be as precise as if manual annotation of flow information was provided. The aiT WCET estimation tool uses a parameter named virtual unrolling factor to trade off WCET estimation precision with analysis complexity. The virtual unrolling factor defines the number of contexts used to analyze loops. The higher the virtual unrolling factor, the more precise the WCET estimate. On the other hand, the higher the virtual unrolling factor, the longer the analysis time and consumed memory. In [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], the following process is used to select the unrolling factor for each benchmark: for each benchmark, we start from a low value and increase it as long as the analysis runs in a reasonable time (less than 30 seconds) and as long as it increases the precision (see [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] for details).

Four techniques are presented in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] to generate sequences of optimization passes:

• Association: this technique is based on a ranking of the impact of individual optimization passes in a sequence on the WCET estimate (as positive, negative, neutral). This ranking is obtained by analyzing previously generated optimization sequences. More precisely, the technique uses a lattice of the sets of optimization passes, with set inclusion as partial order in the lattice. A new optimization flag in a long sequence is evaluated (as positive, negative, neutral within the sequence) by comparing the estimated WCET of the long sequence with the largest subset of previously evaluated sequences of the lattice. The classification of a flag impacts the probability of selecting it in future generated sequences, promoting flags with positive rankings over flags with neutral or negative rankings. By construction, by using sets to represent optimization sequences, [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] disregards the ordering of flags in the optimization sequence and the multiple occurrences of a given flag in a sequence. • Cleaning: this technique, based on Association removes from the execution sequence generated by Association the optimization passes that do not improve the WCET estimate.

Cleaning is shown in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] to outperform Association. Cleaning results in an average reduction of WCET estimates of 20% compared to the best optimization level applicable. • Random and Genetic as baselines that naively generate optimization sequences. Genetic was shown in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] to outperform Random.

Since the impact of a given optimization pass depends on which pass was applied previously in the optimization sequence, a sequence in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] may contain multiple occurrences of the same pass.

The work presented in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] used four different benchmark suites. The first one is the Mälardalen benchmark suite [START_REF] Gustafsson | The Mälardalen WCET Benchmarks: Past, Present And Future[END_REF] which is a reference for WCET estimation techniques 1 . The second one is the Polybench suite [START_REF]The Polybench benchmark suite[END_REF], which contains a lot of linear algebra codes. Few benchmarks also come from the MiBench suite [START_REF] Matthew R Guthaus | Mibench: A free, commercially representative embedded benchmark suite[END_REF] and the PolyMage suite [START_REF] Teja Mullapudi | Polymage: Automatic optimization for image processing pipelines[END_REF].

PRELIMINARY FINDINGS

Two preliminary findings, respectively presented in Sections 3.1 and 3.2, allowed us to outperform [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]: the fact that long optimization sequences result in lower WCET estimates as compared to shorter sequences, and the use of a cache solution to speed-up the iterative compilation process.

Longer optimization chains result in lower WCET estimates

To evaluate the impact of the length of sequences, we run the Random and Genetic algorithms of [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], both with sequences of maximum sizes 50 and 1000. We compared them on a subset of the Polybench benchmark suite that runs in a reasonable time (which is the full set of the Polybench suite, except 3mm, fdtd-2d, gesummv, jacobi-1d, and jacobi-2d). We performed these preliminary experiments on the Polybench benchmarks because they are the largest programs analyzed in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] (much larger than those in the Mälardalen/Heptane benchmark suite) and also because they contain mainly loop nests and, as such, are more sensitive to loop optimization than benchmarks from the Mälardalen/Heptane suite.

Results show that long sequences lead to lower WCET estimates than when using short sequences, with an average decrease of 10%. Sometimes, there are cases where the WCET estimate is significantly lower than the usual WCET estimation found. Let us take the example of the benchmark 2mm, and let us denote by WCET bestopt the WCET estimate when the best optimization level is used. The WCET estimate of 2mm when using long sequences was 40% of WCET bestopt , whereas when using small sequences it was 90% of WCET bestopt . Even by removing these few outliers where the WCET estimate is significantly better, on average, it is still better, however by only 2% of the WCET estimate of the best optimization applicable.

We analyzed the compilation sequence resulting in the lower WCET, for each algorithm on each benchmark. As already observed in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], a lot of options in generated large sequences are useless. To eliminate these useless options, we tested each option in the optimization sequence one by one. If removing the option results in a WCET estimate lower or equal than when the option is in the sequence, this one is removed. Otherwise, it is kept. We obtain a "minimal" sequence of options by iterating this process. The minimal sequence we obtain from the algorithms that use large sequence ranges from 20 to 30 options, which is far longer than minimal sequences obtained by the same algorithms with small sequences of options that range from 5 to 10.

In summary, generating long sequences of optimizations, even if most of them are useless and can be safely removed, result in lower WCET estimates than when using shorter sequences and longer minimal sequence that will not be found otherwise.

One may wonder why long sequences work better if only 30 flags of them are sufficient to obtain the same result. Our intuition is that out of all sequences of size below 50, few result in a significant reduction of the WCET estimate (few is relative to the number of options), so they are incredibly hard to find. Besides, inserting new flags in the sequence has minor impact on the WCET estimate: if a sequence of size 50 works well, then inserting random flags, even if we insert 1000 flags, rarely damages the WCET. So by testing a sequence of 1000 flags, we are actually testing if one of the subsequences of size 50 works well. Hence, testing sequences of size 1000 test largely more sequences than testing sequences of size 50, therefore, statistically we will often find a sequence of size 50 hidden in a sequence of size 1000 that works well.

Moreover, it seems that classical search algorithms cannot find these short sequences that work well because the neighbors of a good solution are not systematically good solutions (also, these neighbors are very rare and hard to find), however, this is not the case for long sequences because most flags are useless. This may also explain why meta-heuristic algorithms work better when they use long sequences and why it seems hard to design an algorithm to find the rare sequences of size below 50 that works very well. In addition, in section 5.2 we explain that the compiler sometimes generates incorrect code when we use long sequences. Maybe the same phenomenon is involved, one could also probably isolate a sequence of size below 50 that generates incorrect code too, yet taking randomly 50 options rarely produces incorrect code while taking 1000 options does this with a higher probability.

Further observations on the impact of long sequence lengths on WCET estimates.

Further observations on the impact of long sequences of optimizations on WCET estimates are given below and are illustrated in Figure 2. Two sequences of optimizations were generated. The first one, named SO1 in the following, is of length 250 and is used in Figures 2a and2b. The second one, named SO2, is of length 6000, and is used in Figure 2c. Both sequences were obtained by a variation of the Random algorithm, which appends random sequences of options to the best optimization sequence already found (and rotates the best optimization sequence used to avoid being blocked in a local minimum like [START_REF] Edmund | The late acceptance hill-climbing heuristic[END_REF]). The benchmark under analysis in the Figure is qurt.

Figure 2a first depicts the evolution of the WCET estimates when only the first x optimizations of SO1 are applied, with x in the interval [0..250]. The figure shows that these short optimization chains may result in modifications of the WCET in non-significant ways or even make the WCET analysis fails, which is represented by a value of -1 and depicted by red crosses in the figure. However, after applying several options from SO1, some options significantly reduce the WCET estimate. This shows that some optimizations, although not decreasing the WCET estimate themselves, allow other optimizations placed further in the sequence to decrease the WCET estimate significantly. This Figure shows that not only the set of optimization matters but also their ordering in the optimization chain.

Figure 2b further illustrates the impact of the optimizations sequence order. The figure depicts the impact on the estimated WCET when applying x options (from index 150 to 150 + x in SO1) to a program that was at first compiled with -O0. In contrast to Figure 2a, which applied options from indices 0 to 149 before applying the x optimizations, Figure 2b shows that applying the x optimizations results in a bad WCET estimate, even worse than when compiled with -O0. These results show that long optimization chains may be required to allow further optimizations in the sequence to be effective.

Finally, Figure 2c shows the evolution of WCET estimates when only the first x optimizations of SO2 are applied, with x in the interval [0..6000]. The graph is similar to the first one, lousy WCET estimates are found along the way, and once the minimum is found, the WCET estimate does not vary much. This effect is observed with large sequences in general, independently of their size.

These observations show that long options sequences may significantly allow further optimizations to decrease WCET estimates. Most papers on iterative compilation take for granted that the list of options to be explored is short. The observations reported in this section show the opposite.

Caching WCET estimates helps

To speed up the search for the optimization sequence resulting in the lower WCET estimate, we used a cache. This cache stores for each optimization sequence the resulting WCET estimate. It, therefore, maps strings, which represent an optimization flag sequence, to integers, which represent the WCET estimates. Each time an optimization sequence is evaluated, the resulting WCET estimate is stored in the cache. If the same sequence is evaluated again, then the WCET estimate cached by the first evaluation is used, avoiding compiling the code and calling the WCET estimation tool.

We observed that when using Random selection of optimization sequences, the cache has a negligible impact since the probability of evaluating the same sequence several times is very low. However, for the algorithms that may explore over and over the same solutions, for instance, the Genetic algorithm, it has, on average, on all benchmarks with a cache of unbounded size, 10% of cache hits. This 10% of cache hits enlarge the search space of optimizations by 10% and for a fixed number of calls to the WCET estimation tool allows further WCET estimate reductions.

Figure 3 details how the introduction of a cache impacts the WCET estimates found by Winston, the iterative compilation algorithm we propose, and detail in Section 4. These experiments were performed by applying Winston on all benchmarks used in the evaluation of Winston, given in Table 1, with a number of calls to aiT set to 1000, and no limit on the cache size 2 . The figure shows the histogram of the gain brought by the caching mechanisms on the WCET estimates for a fixed number of calls to the WCET estimation tool (the cache allows a larger exploration of the space of optimization sequences by avoiding useless WCET estimations. When there is enough locality in the search (7 experiments out of 42, i.e., 17%), the same sequence is explored several times, and the WCET estimate is decreased (by up to 25%). When the search does not have locality, there is no improvement of the WCET estimate (but also almost no overhead, the time overhead for accessing the cache is negligible compared to the WCET estimation delay).

Globally, caching optimization sequences WCET estimates help to reduce the future WCET estimation, at least for search algorithms that exhibit some locality in their search.

WINSTON: ITERATIVE COMPILATION WITH LONG OPTIMIZATION SEQUENCES

Winston is inspired by the work presented in [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] which performs iterative compilation with the Nelder-Mead method [START_REF] Nelder | A simplex method for function minimization[END_REF]. The Nelder-Mead technique is a heuristic technique, often used in nonlinear optimization problems, that finds the minimum of an objective function in a multidimensional space. The concept of simplex in [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] is a geometrical figure consisting of n+1 points in n-dimensions (in our case a simplex is a sequence of optimization flags). Through a sequence of geometric transformations (reflection, expansion, contraction, shrink as defined in [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF]), the initial simplex moves towards minimum and away from maximum. The idea behind [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] is that the geometric transformations proposed in the Nelder-Mead technique will give better results than those of genetic algorithms that use randomly generated values when performing mutation and cross-over. Our adaptation of [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] to long optimization sequences in Winston makes Winston very similar to a genetic algorithm [START_REF] Conroy | Handbook of genetic algorithms by lawrence davis[END_REF] that would only do cross-over operations and no mutation. Indeed, since we aim at generating large sequences of varied compilation options, the mutation operator of the genetic algorithm does not seem appropriate to our case because it would have an insignificant impact in the context of long optimization sequences. In the same way, trying to understand which option contributes to the lower WCET estimate like the best algorithm of [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] would be too time-consuming as there are too many compilation options. Moreover, the idea described in [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] was interesting and it seemed to work with a large sequence of options, it creates new points to explore from previous ones, and no knowledge is required about them, which is exactly what we are dealing with.

More precisely, Winston first creates a few random solutions by choosing a sequence length between 10 and 1000, and then picks optimization flags within the sequence randomly. The selected random sequences form the initial pool of known good solutions. Then, at each iteration, Winston takes two random solutions from this pool, combines them to create a new one, and similarly to [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF] adds it to the pool if the resulting WCET estimate is lower. The process of combining two sequences to form a new one executes one of the following procedures with equal probability:

• Concatenation of two sequences. For instance the concatenation of "-loop-rotate -sink" and "-inline -sink" is "-loop-rotate -sink -inline -sink", with "-sink" now being duplicated. • Intersection of two sequences: the result is the first sequence, where each element that is not on the second sequence is removed. For instance the intersection of "-loop-rotate -sink" and "-inline -sink" is "-sink". This can result in an empty optimization sequence. • Concatenation of two subsets of two sequences. To pick a subset of options, we pick two indexes randomly between 0 and the sequence size. For instance the concatenation of "-loop-rotate -sink" and "-inline -sink" is "-loop-rotate -sink -sink", or "-sink -inline -sink".

There is no limit on the size of sequences, hence many ones are explored. We tried to fine-tune the probabilities to select the combination procedure, but it makes only a tiny difference (or no difference at all).

Note that similarly to [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] and as shown in the examples above, an optimization sequence may contain multiple occurrences of the same optimization flag.

EXPERIMENTAL EVALUATION

Our experimental setup, largely inspired from [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] is presented in Section 5.1. Section 5.2 then compares the WCET estimates obtained using Winston to those obtained by the state-of-the-art iterative compilation techniques, and details the results on the benchmarks we have analyzed.

Experimental setup

Our experimental setup is, unless otherwise stated, the same as in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]. The target processor is a 32-bit RISC LEON3 processor, with separate 16 KB 2-way instruction and data caches. Programs are compiled with the same compiler as in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]: LLVM 4.0 for the SPARC architecture, using Gaisler BCC 2.0.5 implementation [START_REF]Gaisler bare-c cross-compiler system[END_REF]. The LLVM optimizer opt was applied separately, and all its 53 optimizations passes were used in the experiments.

Timing analysis is carried out by AbsInt aiT [START_REF] Online | aiT:the industry standard for static timing analysis[END_REF] version 19 targeting the LEON3 architecture (the version of absInt aiT is therefore a slightly more recent version than used in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]). Similarly to [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], sequences that make the compiler crash or infinitely loop are disregarded. The same process as in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] is used the virtual unrolling factor used by aiT (see Section 2).

One slight difference with the experimental setup used in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] is the introduction of a correctness check of compiled programs. This check is motivated by the observation that some programs are compiled successfully but produce incorrect results, probably due to untested long sequences of optimization passes. The correctness check is performed by comparing the program's output with the one obtained without optimization flags. For the sake of simplicity and efficiency, we compile the LLVM IR on the processor of the machine running the experiment, which therefore compiles the LLVM IR to x86, instead of executing a LEON3 interpreter to get the output of the program. The correctness check is performed on the input data provided with the code of the benchmarks. As further discussed in Section 5.3, this very simple correctness check does not capture all incorrectly generated code. A more complex correctness check (targeting LEON3 code and exploring varied input data) would have to be performed on the solutions with the lower WCET estimates, in order to remove the ones with incorrect code (if any). Winston was evaluated on the benchmarks listed in Table 1. They come from the Mälardalen WCET benchmark suite as modified for their use in the Heptane static WCET analysis tool [START_REF] Hardy | The Heptane Static Worst-Case Execution Time Estimation Tool[END_REF], and the Polybench benchmark suite [START_REF]The Polybench benchmark suite[END_REF] for linear algebra, physics and statistics. The benchmarks we have evaluated are a large subset of those used in [7]3 .

Experimental results

We now compare Winston to the best algorithm of [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] (named Cleaning in the original publication), to a Random algorithm operating on sequences of maximum size 1000, and to a Genetic algorithm operating with sequences of maximum size 1000. Based on our preliminary findings, Random and Genetic are configured to generate longer sequences than in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], in which a maximum sequence length of 50 was used. The Cleaning algorithm operates on sequences of size 50, and Winston, by construction, has no limit on the size of sequences it manipulates. All algorithms, except the Cleaning algorithm, have a cache implemented, as previously described in section 3.2. All techniques iterate until the WCET estimation tool aiT is called 1000 times.

The results are given in Figure 4, which represents the evolution of the results of Random, Genetic, Cleaning and Winston over the 1000 iterations. The x-axis of the figure is the number of non-cached calls to the WCET estimation tool aiT. The y-axis of the figure is the geometric mean over the benchmarks of the ratio between the estimated WCET, with the technique under consideration, over the estimated WCET with the best optimization level applicable (-O0..-O3). A value lower than 1 therefore means that the estimated WCET is improved. Only the very first iterations may result in WCET estimates worst than the best optimization level applicable. The geometric mean is used as it is employed in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], and also because it amplifies the effect of benchmarks where a significant reduction of the WCET estimate is found.

Figure 4 shows that Winston provides better WCET estimates than all other algorithms of the state-of-the-art, even better than a naive random/genetic algorithm that uses a large sequence too. The fact that both the random and genetic algorithms outperform the state-of-the-art is due to the use of long sequences. We tried to test the cleaning algorithm with large sequences to provide a better comparison but it does not work well as it tries to learn which options work best, which is unpractical when 1000 options are used, and it tries to clean the sequence from unnecessary options, which is also unpractical with large sequences.

The runtime of Winston is very similar to the one reported in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] (around 10000 seconds on average on all the benchmarks). Notwithstanding that some methods have more overhead than others (especially when it comes to the time-consuming task of compiling the code with large sequences of options), the WCET estimation time is always longer than the compilation time, and computing the WCET estimate in parallel to other operations would reduce all overheads to a negligible value.

An important remark about Winston (that also applies to the state-of-the-art algorithms Winston is compared with) if that it is an anytime algorithm: the longer it runs, the better the results. As shown in Figure 4 major improvements appear with a low number of iterations in the iterative compilation process. The number of iterations can then be tuned to match the complexity of the code under optimization, and make Winston and similar techniques applicable to real-world code and not only benchmarks.

The detailed results by benchmarks can be found in Figures 5 (for the Mälardalen/Heptane benchmarks) and 6 (for the Polybench benchmarks). Again in these figures, the x-axis is the number of non-cached computations of the WCET estimate. Except for a few benchmarks, Winston provides the lower WCET estimate. Moreover, Winston often significantly reduces it compared to the other algorithms.

The likeliness for Winston to find a significant improvement in the WCET estimate varies with the benchmark considered. For instance, for jacobi-1d one is found approximately 60% of the time over the 1000 iterations, whereas on small benchmarks, like qurt, it is way rarer to find a significant reduction of the WCET estimate (approximately 5% of the time). Overall the best improvements are found in the Polybench suite. These significant improvements are not found for all benchmarks. For instance, with the covariance benchmark, Winston does not obtain a significant reduction of the WCET estimate, whereas other algorithms do.

As a final remark, all algorithms, Winston and all the other algorithms Winston is compared with, start with a set of randomly selected solutions. For this reason, all the algorithms are sensitive to the set of initial solutions, albeit in a different way. For the sake of reproducibility, the seed of the random number generator was set to the same value when evaluating all algorithms, which therefore start with the same set of initial solutions. It may happen that a good solution is found "by chance" because of the initial seed, minimizing the observed difference between algorithms. We additionally observed that changing the seed can (although marginally) change the solution found by each algorithm. A deeper comparison between the algorithms would require an exploration of the seed values. Such an exploration is hard to achieve due to the run-time of iterative compilation (hours for the more complex benchmarks).

Discussion

Some interesting problems arose with the use of large optimization sequences. First, the time it takes to compile benchmarks can be long, and on a few benchmarks it turns out to be much longer than the time taken by the WCET analysis tool. This could be improved by parallelizing the overall iterative compilation process (compiling a benchmark while the WCET analysis is run on another one). But overall, using large sequences can make the algorithm significantly a number of iterations. We observed that too frequent cleaning reduces the benefits of using long sequences. Defining the best frequency of cleaning is left for future work. Second, we observed that sometimes the compiled code is incorrect. This is due to bugs in llvm/opt when applying too many optimizations passes. While it rarely happens with short sequences of options, it was sufficiently frequent in our experiments to motivate a correctness check of the compiled code. To do so, we compiled the intermediate code to the assembly code of the host machine (x86) and executed it on one input: the code prints the result so we can compare it with the result when no optimization is applied. The result of this process is sometimes strange. For instance, it can have a finite WCET estimate, but when executed on our machine, it has an infinite loop (or an abnormally long execution time). Also, as already observed in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], sometimes llvm/opt crashes when it tries to apply optimization passes. All in all, it seems quite difficult to be sure of an optimization list that will not break the program. All sequences resulting in incorrect code are safely ignored in our experiments. Generating correct code with complex and long optimization chains looks like an interesting area for future research, but is outside this paper's scope. One interesting observation is that a significant reduction of WCET estimates happens mainly on the Polybench benchmark suite. It seems that benchmarks where significant reductions are found, maybe the ones where polyhedral optimizations find significant improvements, if so, the more complex the code, the better we can optimize the WCET. We also tried to lower the virtual unrolling factor, and significant reductions were no longer found, which may indicate that the simpler the program the less opportunity for these significant reductions to be found.

Unsurprisingly, the sequence of options that work best on a benchmark cannot in general be re-used elsewhere. What works best for a benchmark does not give a good result to others. The sequence of options resulting in the lower WCET estimate for each benchmark is also very different, we could not find obvious similarities between them, even when looking at cleaned sequences that contain only 20 to 30 options.

Another situation where this algorithm finds significant reduction is the qurt example from the Mälardalen benchmark. In this example, one function calls another one three times, and it seems the significant reduction of the WCET comes from optimizations that delete the first two calls, as their results are never used. This shows that our method discovers compilation sequences that are able to remove aggressively dead code, whereas traditional compiler options specialized in dead code elimination are unable to remove it.

On one instance of the Polybench benchmarks, the way the result was logged was wrong: only the first element of the result array was logged instead of the whole array. Our algorithm finds in this example a sequence of options that safely delete all the code that was not dealing with this first element. Although, in this example, a large amount of dead code was introduced by mistake, this situation shows that our algorithm is able to perform aggressive dead code elimination, which is a significant improvement over a single -O3 optimization flag that rarely eliminates a large amount of dead code.

RELATED WORK

Iterative compilation techniques aim at minimizing an objective (most of the time the average-case performance) by searching the huge space of compilation options as efficiently as possible. To do so, meta-heuristic algorithms are usually used, which are high-level heuristics that work well for a wide range of optimization problems [START_REF] Dokeroglu | A survey on new generation metaheuristic algorithms[END_REF]. Therefore, the literature about meta-heuristic algorithms is very developed, it goes from the genetic algorithm [START_REF] Conroy | Handbook of genetic algorithms by lawrence davis[END_REF][START_REF] Shi | A survey of fitness approximation methods applied in evolutionary algorithms[END_REF] that we used in this work to more exotic algorithms [START_REF] Edmund | The late acceptance hill-climbing heuristic[END_REF][START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF], which inspired us when we created Winston. Some of these meta-heuristic algorithms have been used for iterative compilation, for example, the genetic algorithm in [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], or the algorithm derived from the simplex method in [START_REF] Lu | Combining model and iterative compilation for program performance optimization[END_REF]. Based on our observation that long optimization sequences significantly reduce WCET estimates, we have designed Winston, which uses the meta-heuristics well-suited to derive long optimization chains.

The iterative compilation has been an actively researched topic for decades [START_REF] Bodin | Iterative compilation in a non-linear optimisation space[END_REF][START_REF] Chen | Deconstructing iterative optimization[END_REF][START_REF] Gg Fursin | Evaluating iterative compilation[END_REF][START_REF] Kisuki | Iterative compilation in program optimization[END_REF], however, to the best of our knowledge, none of these works tried to use a tremendous amount of optimization options. Our work differs from these in the sense that algorithms described in this paper find optimization sequences that are impossible to find by hand.

Many techniques have been developed to determine safe and as precise as possible WCET estimates [START_REF] Wilhelm | The worst-case execution-time problem-overview of methods and survey of tools[END_REF]. While research on WCET estimation led to a large amount of research, optimizing code for WCET minimization comparatively received less attention. Existing techniques for WCET-oriented optimization may optimize the usage of the memory hierarchy [START_REF] Lokuciejewski | Wcet-driven cache-based procedure positioning optimizations[END_REF][START_REF] Suhendra | WCET centric data allocation to scratchpad memory[END_REF] branch predictors [START_REF] Bodin | A wcet-oriented static branch prediction scheme for real time systems[END_REF], or perform WCET-aware loop transformations [START_REF] Lokuciejewski | Combining worst-case timing models, loop unrolling, and static loop analysis for wcet minimization[END_REF]. In contrast to these approaches, we take benefit from the full set of compiler optimizations from mainstream compilers, designed for averagecase performance, to automatically select the ones that minimize WCET estimates. The research about iterative compilation and WCET is reduced to [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF][START_REF] Puaut | Fine-grain iterative compilation for wcet estimation[END_REF]. Our main finding as compared to [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF][START_REF] Puaut | Fine-grain iterative compilation for wcet estimation[END_REF] is that long optimization sequences allow larger reductions of WCET estimates.

Finally, our method, in opposite to [START_REF] Puaut | Fine-grain iterative compilation for wcet estimation[END_REF], compiles the whole source code with the same sequence of options instead of using a different set of options per function. While this reduces the search space, it may give a better result to use a fine-grain approach, as options that work best for certain benchmarks do not work for others, and therefore using a different set of options for a different part of the code seems appropriate.

CONCLUSION

In this work, we have discovered the counter-intuitive observation that using long sequences of optimization passes helps lower WCET estimates. Based on that observation, we designed an algorithm named Winston, suited to the generation of long sequences. This algorithm performs significantly better than [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF], allowing a reduction of WCET estimates of 35% on average, as compared to the 20% of [START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF] using the same benchmarks and experimental conditions.

In future work, we will refine Winston to behave more consistently on the benchmarks, as there are still some benchmarks on which more naive methods perform better than Winston. We will also consider cleaning optimization sequences to reduce compilation time while not altering the positive impact of long sequences. Another direction for future work would be to optimize different portions of the code from a given application using different optimization flags to better adapt the optimization flags to that portion, with the pitfall of further enlarging the search space. Finally, an open question we would like to answer is whether large sequences are useful when the average-case is considered instead of the worstcase. Answering this question may lead to interesting discoveries and new algorithms for iterative compilation. .

Figure 1 :

 1 Figure 1: Iterative WCET-oriented compilation workflow (from [7])

  (a) Evolution of the WCET estimate when only the first x options are taken (optimization sequence SO 1 of size 250). (b) Evolution of the WCET estimate when only the options from index 150 to 150+x are taken (optimization sequence SO 1 of size 250).

  (c) Evolution of the WCET estimate when the first x option are taken (optimization sequence SO 3 of size 6000).

Figure 2 :

 2 Figure 2: Impact of number of optimizations and position in optimization chain on the WCET estimate. A value of -1 means the analyzer fails to provide a WCET estimate.

Figure 3 :

 3 Figure 3: Impact of the cache on Winston

Figure 4 :

 4 Figure4: Result of Winston, against various algorithms of the state-of-the-art[START_REF] Mickaël Dardaillon | Reconciling compiler optimizations and wcet estimation using iterative compilation[END_REF]. A geometrical mean over the benchmarks is used to represent the ratio between the estimated WCET, with the technique under consideration, over the estimated WCET with the best optimization level applicable (-O0..-O3).

Figure 5 :

 5 Figure 5: Detailed results per benchmark -Mälardalen/Heptane

Figure 6 :

 6 Figure 6: Detailed results per benchmark -Polybench

Table 1 :

 1 Benchmarks used in the experimental evaluation

	Collection	Benchmarks
	Mälardalen/Heptane crc, des, duff, expint, fdct, jfdctint, ludcmp, matmult, ns, nsich-
		neu, qurt, statemate
	Polybench	2mm, 3mm, adi, atax, bicg, covariance, durbin, fdtd-2d, floyd-
		warshall, gemm, gemver, gesummv, heat-3d, jacobi-1d, jacobi-
		2d, lu, mvt, symm, syr2k, syrk, trisolv, trmm

The actual source code used is the benchmark suite coming with the Heptane static WCET analysis tool[START_REF] Hardy | The Heptane Static Worst-Case Execution Time Estimation Tool[END_REF], very close to the Mälardalen benchmark suite. This code will be named Mälardalen/Heptane in the following.

This choice of not limiting the cache size was motivated by the selected number of calls to the WCET estimation tool aiT (1000), which was low enough to have a reasonable number of entries in the cache and consequently fast lookup.

We manually removed some benchmarks when we found out after the entire experiment that the results were incorrect due to a mistake we made in the logging of the output of programs

Acknowledgments

The authors would like to thank Abderaouf (Nassim) Amalou, Hugo Reymond and the anonymous reviewers for their fruitful comments on earlier drafts of this paper.


V Dalbert

N Mary

B Normand

C Verdu

S Saedlou

In situ determinations of the wear surfaces, volumes and kinetics of repassivation: contribution in the understanding of the tribocorrosion behaviour of a ferritic stainless steel in various pH

Keywords: Archard's law, repassivation kinetic, in situ analysis, pH dependence

niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

-The wear volume increases linearly with sliding time as proposed by Archard's law irrespectively to pH.

-The Archard's coefficient is not a simple proportionality factor and depends on the chemistry of the environment and it is not a linear function of pH.

-The wear accelerated corrosion has a greater influence in acidic solution than in neutral and basic solution.

-The repassivation rate is influenced by the redox potential of the surface and also the nature of the passive layer formed.

1-Introduction

Tribocorrosion is a complex process in which mechanical and chemical loads act synergistically on material damages. Consequently, tribocorrosion is greater than tribological or chemical damages considered separately. The quantification of the tribocorrosion is usually based on the amount of matter loss after sliding. From empirical assumptions, different models link the wear to physical parameters [START_REF] Meng | Wear models and predictive equations: their form and content[END_REF] [START_REF] Maldonado | Mechanical and chemical mechanisms in the tribocorrosion of a Stellite type alloy[END_REF]. Among them, the Archard's law assumes a linear evolution of the wear volume as a function of the sliding distance, the normal load and the flow pressure (equivalent to the hardness) [START_REF] Archard | The Wear of Metals under Unlubricated Conditions[END_REF].

As the contact properties also depend on the geometries (general shape of the contact and surface roughness), a coefficient was introduced (named Archard's coefficient).

Several tribocorrosion studies emphasis that the wear resistance is not an intrinsic property of the material and the passive layer has to be considered [START_REF] Mischler | The role of passive oxide films on the degradation of steel in tribocorrosion systems[END_REF]. As examples, Garcia et al. [START_REF] Garcı́a | Corrosion-wear of passivating materials in sliding contacts based on a concept of active wear track area[END_REF] highlighted the existence of a load domain where an increase of the normal load promotes the wear of an austenitic stainless steel immerged in acidic solution. In this domain, the passive layer of few nanometer thick affects the plastic deformation behavior of subsurface and the wear consequently [START_REF] Bidiville | Effect of surface chemistry on the mechanical response of metals in sliding tribocorrosion systems[END_REF]. Dalbert et al. [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF] showed that the field of plastic deformation increases with the repassivation kinetics which modifies the mechanical properties of the material and enhances the wear resistance. Jemmely et al. [START_REF] Jemmely | Tribocorrosion behaviour of Fe-17Cr stainless steel in acid and alkaline solutions[END_REF] demonstrate that the wear loss in acidic solution is superior than in basic solution for a ferritic stainless steel. The main reason comes from the different chemical compositions of the passive layers which play a role in the degradation mechanism [START_REF] Mischler | The role of passive oxide films on the degradation of steel in tribocorrosion systems[END_REF]. On stainless steel, the nature of the passive film mainly depends on internal (material chemistry) and external factors. The latter is defined by the oxidant power of the solution where pH plays a significant role among other parameters (dissolve dioxygen concentration, anionic species, etc.) [START_REF] Olsson | Passive films on stainless steels-chemistry, structure and growth[END_REF][START_REF] Elsner | Effect of pH on Electrochemical Behaviour and Passive Film Composition of Stainless Steels[END_REF][START_REF] Tanaka | Corrosion characteristics of Fe2O3Cr2O3 artificial passivation films under potentiostatic control[END_REF]. In acidic solution, a chromium oxide layer grows on the metal substrate while hydroxide species are detected in very low quantities [START_REF] Sugimoto | Passive and transpassive films on FeCr alloys in acid and neutral solutions[END_REF]. When the pH increases, iron contributes to the passive layer and hydroxide concentration increases [START_REF] Sato | An overview on the passivity of metals[END_REF][START_REF] Liu | Influence of pH on the passivation behavior of 254SMO stainless steel in 3.5% NaCl solution[END_REF]. The solubility of hydroxide species is also affected by changes in pH, and larger quantities are usually found in basic solution rather than in acidic environment [START_REF] Elsner | Effect of pH on Electrochemical Behaviour and Passive Film Composition of Stainless Steels[END_REF]. Since the passive film is at the interface between the first body and the counter body surface in tribocorrosion, any modifications in its hardness (pure chromium oxide or mix chromium-iron oxide), its surface energy (oxide, hydroxide species) may change the physical-chemical properties of the contact and as the result the wear behavior.

Most of these studies performed in potentiostatic conditions attended to describe and to quantify the corrosion-wear behavior of a material. However, Open Circuit Potential tests are still preferred to investigate the wear mechanism under more realistic conditions. The main limitation to the OCP tests is the qualitative description of the surface reactivity from the potential evolution [START_REF] Ponthiaux | Electrochemical techniques for studying tribocorrosion processes[END_REF]. Thus, modeling approaches coupled with experiments were developed to quantify the wear-accelerated corrosion [START_REF] Olsson | Passive films on stainless steels-chemistry, structure and growth[END_REF][START_REF] Papageorgiou | Electrochemical Simulation of the Current and Potential Response in Sliding Tribocorrosion[END_REF]. From the modeling viewpoint, Papageorgiou and coworkers [START_REF] Papageorgiou | Electrochemical Simulation of the Current and Potential Response in Sliding Tribocorrosion[END_REF] highlighted the influence of the ratio of worn and unworn surfaces on the kinetic of the cathodic reaction (i.e., dissolve dioxygen reduction). More recently Gilbert et al. [START_REF] Gilbert | Area-dependent impedance-based voltage shifts during tribocorrosion of Ti-6Al-4V biomaterials: theory and experiment[END_REF] developed a model to take into account the impedance of the worn and unworn surface to predict the potential evolution during fretting corrosion. Irrespective of the model, the current flowing to the wear track is always estimated without experimental comparisons. From the experimental viewpoint, potential and current variations during sliding tests can be quantified using the electrochemical noise (EN) or galvanic coupling (GC) techniques. In those two approaches, the working electrode (i.e., the sample) is connected to a second working electrode (of a similar or different nature) through a Zero-Resistance Ammeter (ZRA). The potential shown corresponds to working electrode. In absence of sliding, the potential steady state and current are controlled by (i) the potential difference between the two working electrodes, (ii) the oxidant power of the solution and (iii) the surface ratio between the two electrodes. In the EN approach, the signal processing is based on a frequency analysis. The power spectral density (PSD) is extracted from the fluctuations of the potential and the current and gives characteristic curves depending on the corrosion mode [START_REF] Hladky | The measurement of corrosion using electrochemical 1f noise[END_REF]. Since high frequency measurements are performed, fast reactions can be described such as the double layer capacitance charging or the depassivation/repassivation rates of the wear track [START_REF] Berradja | An electrochemical noise study of tribocorrosion processes of AISI 304[END_REF].

In the GC tests, current transients are mostly analyzed in the time domain [START_REF] Jemmely | Electrochemical modeling of passivation phenomena in tribocorrosion[END_REF][START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF][START_REF] Burstein | Growth of passivating films on scratched 304L stainless steel in alkaline solution[END_REF][START_REF] Adler | Repassivation of 304 Stainless Steel Investigated with a Single Scratch Test[END_REF]. The current envelop is a function of the aggressiveness of the solution, the characteristics of the mechanical contact (normal force, stroke velocity, etc.) and the chemistry of material [START_REF] Jemmely | Electrochemical modeling of passivation phenomena in tribocorrosion[END_REF][START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF][START_REF] Burstein | Growth of passivating films on scratched 304L stainless steel in alkaline solution[END_REF][START_REF] Adler | Repassivation of 304 Stainless Steel Investigated with a Single Scratch Test[END_REF]. In both the EN and GC approaches, the design of the tribocorrosion cell is of a great importance to record the current and the potential in optimum conditions. The distance between the working electrode and the second working electrode should to be controlled with regard to current field lines [START_REF] Landolt | Tribocorrosion of Passive Metals and Coatings[END_REF]. The surrounding area of the track should be insulated to force the galvanic coupling between the working electrode and the second working electrode [START_REF] Espallargas | A new experimental technique for quantifying the galvanic coupling effects on stainless steel during tribocorrosion under equilibrium conditions[END_REF]. The cathodic surface defined by the second working electrode should be significantly larger than the anodic surface (i.e., the wear track) [START_REF] Papageorgiou | Electrochemical Simulation of the Current and Potential Response in Sliding Tribocorrosion[END_REF][START_REF] Déforge | Electrochemical Noise Analysis of Tribocorrosion Processes under Steady-State Friction Regime[END_REF]. The tribocorrosion cell optimization concerns also the chemistry of the second working electrode. Wu et al. [START_REF] Wu | Electrochemical noise measurements on stainless steel during corrosionwear in sliding contacts[END_REF] demonstrated that a microelectrode in platinum is more suitable than a microelectrode made with material of the working electrode. All these achievements highlight that galvanic coupling techniques are powerful tools to characterize the reactivity of the worn surface during sliding even if they might introduce a bias more a less important in the electrochemical response compare to OCP measurements.

Based on all those considerations, this study aims to discuss the corrosion wear behavior of a ferritic stainless steel immersed into three different solutions pH from galvanic coupling measurements with an emphasis place on:

-The correlation between the volume of matter loss as a function of the solution. For that purpose, an optical microscope will be added to the tribocorrosion in order to precisely quantify at each moment of sliding the wear and to discuss the Archard's law validity. The methodology for the wear surface and volume determination from optical observation is proposed thereafter -The relation between of the Archard coefficient defined from the previous quantification to the solution pH and look into the mechanical -chemical character of this coefficient.

-The influence of the pH on the repassivation kinetics of the wear track and the contribution of the passive rebuilt in the wear of the material [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF].

Experimental part and method.

Specimens, surface preparation and electrochemical characterizations.

This study was performed on a commercial ferritic stainless steel (AISI430) with a chemical cm 2 was used as counter electrode. Prior to the corrosion or tribocorrosion measurements, a cathodic polarization for 30 min at an applied potential of -1.05 V/MSE was applied to stabilize the passive film and to increase the electrochemical experiments reproducibility [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF].

Tribocorrosion parameters

Sliding tests were performed with a reciprocating-motion tribometer (TCT2005, Falex Company, Belgium) [START_REF] Moine | Tribo electrochemical behavior of ferrite and ferrite-martensite stainless steels in chloride and sulfate media[END_REF]. The contact was defined by the stainless steel as first body whereas the second body was a corundum pin with a cylindrical diameter of 6 ± 0.2 mm and a 24 ± 2 mm tip curvature radius.

The Young's modulus of the AISI430 was about 211 GPa, the Poisson's ratio of 0.3, and hardness about 1.5 ± 0.1 GPa [START_REF] De Frutos | Tribocorrosion behaviour of duplex surface treated AISI 304 stainless steel[END_REF]. The Young's modulus of corundum was about 380 ± 20 GPa, a Poisson's ratio of 0.25, and a hardness of 13.0 ± 0.2 GPa. Since the mechanical properties of the corundum pin were higher than the ferritic stainless steel, the wear was expected on the metal specimen. Note that the contact pressure also induced a significant plastic strain that affected the wear behavior of the material [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF]. A normal load of 10 N was applied for 2000 motions (i.e., 1000 cycles). When the two bodies were in contact, the Hertz's elastic theory gave a contact pressure of 405 MPa and a theoretical pin impression of 450 nm in the metal. A stroke length of 10 mm (trapezoidal shape with a sliding speed of 50 mm/s and a sliding time of 0.2 s) was selected to define study passivation and repassivation for an opened contact. The latency period of 5.5 s was settled from the following closing statements (i.e. one sliding is equal to 5.7 seconds). This duration was establish from preliminary experiments and already used in [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF]. Note that the ohmic drop was quantified and the potential drift was evaluated at 1 × 10 -6 V/MSE and was neglected thereafter [START_REF] Jemmely | Electrochemical modeling of passivation phenomena in tribocorrosion[END_REF][START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF][START_REF] Vieira | Mechanical and electrochemical deterioration mechanisms in the tribocorrosion of Al alloys in NaCl and in NaNO3 solutions[END_REF][START_REF] Landolt | Electrochemical methods in tribocorrosion: a critical appraisal[END_REF].

The tribocorrosion experiments were performed in a galvanic coupling cell where the stainless steel (i.e., the working electrode) was connected to a second working electrode in graphite through a Zero

Resistance Ammeter (Potentiostat Ref600, Gamry company; USA). The potential of the stainless steel electrode was measured according to a mercury sulphate electrode MSE (reference electrode E=+650 mV/ENH) distant from 1 cm to wear track and located at 5 mm above the metallic surface measured.

A schematic representation of the tribocorrosion cell is given in Figure 1 where the graphite electrode with a "half-moon shape" surface (Sgr = 8 cm²) faces the AISI430. The working surface area was equal to 10.5 cm 2 . The distance between these two electrodes was 5 mm. An optical microscope with a lateral resolution of 0.5 x 0.5 µm² for the camera was implemented to capture images of the wear tracks. In the present study, any potential bias was applied between the reference electrode and the working electrode during the tribocorrosion tests. Therefore, the stainless steel potential resulted to the electrical coupling with the graphite electrode. As graphite is nobler than stainless, anodic reactions were located preferentially on the metallic electrode. Two working electrodes surfaces were not modified between all the tests as well as their positions in the electrochemical cell. Consequently, the stainless steel potential depends of the oxidant power of the solution (i.e., the pH). Potential and current data were recorded with a frequency of 100Hz using the GAMRY ESA410 software.

Automatic current range was disable to avoid measurement offset and the current range was fixed to 100 µA. Experiments were performed at least 3 times, and the results shown hereafter represents the average behaviour.

After the tribocorrosion tests, the wear volumes and surfaces (Sa,2Dprofil) were calculated from contact profilometry measurements (Surfascan 2D, Somicronic, Belgium). Multiple 2D profile lines were recorded in the perpendicular direction to the sliding and surfaces or volumes were estimated with the method of Qu et Truhan [START_REF] Qu | An efficient method for accurately determining wear volumes of sliders with non-flat wear scars and compound curvatures[END_REF]. Additionally, the wear tracks were also examined using a field-emission scanning electron microscope (FE-SEM, Supra 55VP, Zeiss, Germany) to investigate the wear mechanism as a function of pH.

Results and discussions

Microstructure and electrochemical behavior.

Figure1a shows the microstructures of AISI430 after electrochemical etching presented in detail in our previous paper [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF]. Typical ferritic microstructure was observed with a grain size in the range of 20-100 µm. The microstructure did not exhibit any particular morphology to the rolling direction. It can be noticed that chromium carbides (black dots) were homogeneously distributed at grain boundaries.

A small depletion of the matrix in chromium was estimated to ∼1.5 wt%.

The polarization curves in Figure 2b show the dependence of the passivation ability of stainless steel with pH. In acidic solution, the corrosion potential is located at -0.9 V/MSE and an active-passive transition is observed at approximately -0.8 V/MSE. Aboce -0.7 V/MSE the current density reached a passive plateau (∼10 µA/cm²). In neutral and basic solutions, the corrosion potentials shift to -0.6

V/MSE and -0.7 V/MSE, respectively. The passive current densities are about 1 µA/cm² and 10

µA/cm² at pH 6.5 and 12.5, respectively. At pH 12.5, the transpassive peak starting at 0.2 VMSE indicated surface activation due to the oxidation of the Cr 3+ throughout the film in Cr 6+ . In the cathodic region, the curve at pH 6.5 and pH 12.5 show a quasi-plateau below -0.9 V/MSE related to the mass transport limitation of dissolved oxygen. Therefore, the passivation ability of the sample is not modified by a modification of the pH below -0.1 V/MSE.

Electrochemical reactivity as a function of the pH.

Figure 3 present the potential (left column) and the current density (right column) variation during the tribocorrosion experiments. When the sliding starts, the potential of the material shifts to higher cathodic value while the current density increases. After sliding, the potential and current tend to reach their initial values, indicating that the passivation ability of the wear track is not lost. In pH 1.5, the potential under sliding (Es) is approximately at -0.4 V/MSE whereas Es are about -0.6 V/MSE and -0.7

V/MSE in the neutral and basic solutions. On one hand, Es locates in the middle of the passive plateau in acid solution (Figure 2b). On the other hand, Es is close to the corrosion potential in neutral and basic solutions. As all Es are in the passive region (see Figure 2b), the electrical charge required to rebuilt the film is linked to the overpotential and may influence the repassivation kinetics of the wear track [START_REF] Lavigne | Thin chromium nitride PVD coatings on stainless steel for conductive component as bipolar plates of PEM fuel cells: Ex-situ and in-situ performances evaluation[END_REF].

In the running-in domain (below ∼400 sliding), the maximums of current densities are at approximately 1 ×10 -2 A/cm 2 , 0.5 ×10 -2 A/cm 2 , and 0.25 ×10 -2 A/cm 2 at the pH 1.5, 6.5, and 12.5, respectively. For the first scratches, the material degradation is directly controlled by the geometry of the asperities of both AISI430 and corundum pin. Micro-cutting is the main mechanism of degradation and leads to a high reactivity of the surface wear track [START_REF] Stachowiak | Tribocorrosion modeling of stainless steel in a sliding pair of pin-on-plate type[END_REF]. Above ∼400 sliding, the current densities decrease as a function of the reactivity of the surface in the electrolyte. In the linear regime of wear, the maximum contact pressure is located at the edges of the wear track whereas the contact pressure inside the wear track is closed to the yielding stress [START_REF] Dalmau | Wear model for describing the time dependence of the material degradation mechanisms of the AISI 316L in a NaCl solution[END_REF]. As a consequence, the current density is representative to the reactivity of the deformed surface (i.e., inside the contact) and the edges of the wear track freshly damaged.

On Figure 3 (left column), the amplitudes of variation depend on the reactivity of the material in the electrolyte. The current rises during sliding because of the oxide film breakdown and it falls during the latency period because of the film growth (Figure 4a). The film formation is usually resolved into:

• Double layer charging. In the first few µs, the current response is a function of the differential capacitance of the interface and the re-establishment of the ionic species distribution in the double layer [START_REF] Berradja | An electrochemical noise study of tribocorrosion processes of AISI 304[END_REF][START_REF] Okorie | Kinetics of Formation of Passive Oxide Films on Corrosion-Resistant Fe-Cr Thin Films[END_REF]. Moreover, the sample rate and the trapezoidal motion of the pin are not optimum to detected the double layer charging in our experiments [START_REF]Repassivation rates of surgical implant alloys by rotating-disk scratching measurements -Frangini -2001[END_REF].

• 2D mechanism of recovery. Here two processes occur at the same. The film nucleation and 2D grow takes place in parallel to the dissolution of the surface which is not covered by the protective layer yet [START_REF] Olsson | Evaluation of Passive Film Growth Models with the Electrochemical Quartz Crystal Microbalance on PVD Deposited Cr[END_REF][START_REF] Burstein | The coupled kinetics of film growth and dissolution of stainless steel repassivating in acid solutions[END_REF].

• 3D mechanism. This step corresponds to the film thickening until its characteristic length which depends on the ions and the oxide-hydroxide species involved in the growth mechanism.

• Film ageing. Usually, the film ageing or maturation of on stainless steel occurs in few hours [START_REF] Berradja | An electrochemical noise study of tribocorrosion processes of AISI 304[END_REF][START_REF] Jemmely | Electrochemical modeling of passivation phenomena in tribocorrosion[END_REF][START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF][START_REF] Burstein | Growth of passivating films on scratched 304L stainless steel in alkaline solution[END_REF][START_REF] Adler | Repassivation of 304 Stainless Steel Investigated with a Single Scratch Test[END_REF]. The latency period of 5.7s selected in this work is then not suitable to quantify that process. Therefore, the current analysis in this work focuses only on the 2D mechanism and the 3D mechanism of the film recovery [START_REF] Dalbert | The effects of microstructures and repassivation kinetics on the tribocorrosion resistance of ferrite and ferritemartensite stainless steels[END_REF][START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF][START_REF]Repassivation rates of surgical implant alloys by rotating-disk scratching measurements -Frangini -2001[END_REF][START_REF] Lillard | The Kinetics of Anodic Dissolution and Repassivation on Stainless Steel 304L in Solutions Containing Nitrate[END_REF].

The current fall can be modelled by the sum of two exponentials where τ2D and τ3D are the time constants of the 2D mechanism (film nuclei covering rate) and the 3D mechanism (film thickening), respectively.

= + = ′ . - + ′ . - + ′ Equation 1.
In Equation 1, J'2D and ′ are the current amplitudes related to each process and J'0 represents the limit of the current at the end of the latency period (i.e. the current at the passive steady state). Based on the mixed potential relationship proposed by Fleishmann and Thirsk, Beck expressed the current density fall ( ) as Equation 2[42]:

= . . 1 -. exp ! " . η = ′ . - Equation 2. With = 1 -exp -#. $ % = 1 -exp - & . $ Equation.3.
Where, is the exchange current with the bare surface (A), S is the wear track surface (cm²), ! " is the anodic Tafel slope of the bare surface (V -1 ), η is the overpotential (V) and is the surface coverage of oxide nuclei (mono layer). In Avrami' theory, is a function of the Avrami exponent n and the constant k which reflects the film formation rate in s -n (Equation 3). n is the reaction order and is equal to 1 for islands growth in 2 dimension [START_REF] Lillard | The Kinetics of Anodic Dissolution and Repassivation on Stainless Steel 304L in Solutions Containing Nitrate[END_REF]. Therefore, k is inversely proportional to ' in Equation 3. Figure 4b presents an example of fit for a transient in acidic solution (stroke n°1800) and also reports the covering rate of the surface by passive nuclei. Note that the surface covering by the film nuclei is a fast process and Equation 1 fits well the current fall and this for the whole transients of this study.

Figure 4c and Figure 4d report the variations τ2D and τ3D, respectively. Roughly speaking, τ2D and τ3D are in the range of ~0.2 seconds and ~1.2 seconds, respectively. τ2D values are at least 100 times higher to the time to charge the double layer determined by other authors and are consistent with the characteristic time constants for the nucleation mechanism limited by a charge transfer [START_REF] Déforge | Electrochemical Noise Analysis of Tribocorrosion Processes under Steady-State Friction Regime[END_REF]. Whatever the solution, τ2D and τ3D stabilize after 400 sliding. In the linear regime of wear, τ2D is equal to 0.19 s, 0.3 s and 0.21 s in pH 1.5, pH 6.5 and pH 12.5, respectively. The slowdown of the oxide nuclei germination (τ2D) between pH 1.5 and pH 6.5 comes from the injection of iron oxide in the Cr2O3 layer [START_REF] Sugimoto | Passive and transpassive films on FeCr alloys in acid and neutral solutions[END_REF]. The lower formation enthalpy of the iron oxide (ΔHf θ Fe2O3 = -820 kJ/mol) compared to the chromium oxide (ΔHf θ Cr2O3 of -1200 kJ/mol ) and the smaller overpotential (potential drop during sliding) lead to a lower driving force for the repassivation [START_REF] Camra | Role of Al segregation and high affinity to oxygen in formation of adhesive alumina layers on FeCr alloy support[END_REF][START_REF] Wang | Oxidation energies of transition metal oxides within the $\mathrm{GGA}+\mathrm{U}$ framework[END_REF]. With the pH increases from 6.5 to 12.5, the hydroxyl part of the oxide film and the solubility limit of either chromium or iron hydroxide have to be considered [START_REF] Radhakrishnamurty | pH-potential diagrams at elevated temperatures for the chromium/water system[END_REF][START_REF] Stefánsson | Iron(III) Hydrolysis and Solubility at 25 °C[END_REF]. The precipitation of chromium and iron hydroxides and oxides in basic solution may help the oxide reformation as suggested by the decreases of τ2D. Regarding the film thickening (τ3D), a slowdown in the film thickening occurs above pH 6.5 since hydroxide grow and the film and might change the diffusion of species [START_REF] Macdonald | The history of the Point Defect Model for the passive state: A brief review of film growth aspects[END_REF]. The fluctuations in basic solution are associated to the hydroxide oxide nature of the passive layer which could interface properties and might enhance the adhesion forces between the substrate and the pin. The modification of the contact properties by the formation of a strong hydroxide layer is also supported by the higher average coefficient of friction and also the wear track morphology (Figure 6c and Figure 7, respectively).

In order to confirm the mechanical removal of the oxide by the pin sliding, the average film thickness rebuilt for each stroke can be estimated by Equation 4. The oxide thickness varies between 1 and 2.5 nm and is in the same order of magnitude that passive film in aerated solution determined by Olsson et Stemp [START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF]. Note that the pin penetration depth is larger than the film thickness which confirms the full depassivation of the surface [START_REF] Olsson | Modelling the transient current from two rubbing electrode configurations: insulating pin on metal substrate and metal pin on insulating substrate[END_REF].

Equation. 4

Where Mox is the Cr2O3 oxide (152 g/mol), z is the equivalent number of electron involves in the film growth (3), 4 5 is the density of Cr2O3 (5.2 g/cm 3 ) [START_REF] Jemmely | Tribocorrosion behaviour of Fe-17Cr stainless steel in acid and alkaline solutions[END_REF][START_REF] Lillard | The Kinetics of Anodic Dissolution and Repassivation on Stainless Steel 304L in Solutions Containing Nitrate[END_REF][START_REF] Wang | Application of an electrochemical scratch technique to evaluate contributions of mechanical and electrochemical attacks to corrosive wear of materials[END_REF]. Q3D is the electrical charge density involved in the film grow and is equal to the integral of J3D with time.

Wear surfaces and volumes variation as a function of the pH.

After tribocorrosion tests, the wear surfaces were cleaned with deionized water, pulsed air dried. 2D

profiles were recorded to calculate the wear track surface and volume (Figure 5d). Some fluctuations on the profiles are detected in neutral and basic solutions which might come from the presences of a third body in the wear track and its surrounding. Table 1 reports the average values for the surface (Sa,2Dprofil) and volume (Va,2Dprofil) as a function the pH calculated with [START_REF] Qu | An efficient method for accurately determining wear volumes of sliders with non-flat wear scars and compound curvatures[END_REF]. As expected, the highest wear occurs in acidic solution (3.8 x 10 -5 cm 3 ) while the tests in basic solution mitigate the wear (0.9 x 10 -5 cm 3 ) [START_REF] Jemmely | Tribocorrosion behaviour of Fe-17Cr stainless steel in acid and alkaline solutions[END_REF].

By the mean of the optical microscope implemented in the tribocellule, images of the wear track were taken continuously during the experiment. Figure 5a and Figure 5b present two snapshots of the wear track in solution pH 1.5 after 180 and 1480 sliding, respectively. On those images, the wear track width, l, can be easily measured and the wear track surface (Sa,image) estimated for each stroke (Equation 5). The total wear surface Stotal,image is then the sum of each Sa,image (Equation 6). In this study, the wear tracks are approximated by a cylindrical surface with partial spherical surfaces at the extremities (Equation 5) [START_REF] Qu | An efficient method for accurately determining wear volumes of sliders with non-flat wear scars and compound curvatures[END_REF][START_REF] Doni | Dry sliding and tribocorrosion behaviour of hot pressed CoCrMo biomedical alloy as compared with the cast CoCrMo and Ti6Al4V alloys[END_REF].

",78"9 = 2. ;. < = . ℎ + 2. < = . ?. asin D E F Equation. 5

5 "D,78"9 = ∑ ",78"9 3 H5I %J8K H

Equation. 6

Where Rc is the pin curvature radius (cm), L is the stroke length (cm), and l is the track width (cm).

In Equation 5, the indent penetration h has to be provided as other parameters are otherwise measured.

In the present experiments the corundum pin has the highest hardness, therefore the wear should be mostly sustained by AISI430. Thus, an invariant pin radius (Rc = 24 mm) is considered and the penetration depth h is calculated from Equation 7 [START_REF] Doni | Dry sliding and tribocorrosion behaviour of hot pressed CoCrMo biomedical alloy as compared with the cast CoCrMo and Ti6Al4V alloys[END_REF]. Note that the validity of the assumptions on the pin wear will be discussed later on.

ℎ = <L. M1 -cos PQRST D .E= UV Equation. 7
From the optical measurement of the wear track width, the wear volume loss W ",78"9 is quantified of each stroke (Equation 7). As for Sa,image, the pin deformation is neglected in first approximation in Equation 8. The total wear volume Vtotal,image is then the sum of W ",78"9 along the experiment (Equation 9)

W ",78"9 = ;. ℎ .

Equation.9

Where h is the pin penetration depth (cm), Rc is the pin curvature radius (cm), L is the stroke length (cm), and l is the track width (cm).

Figure 6a and Figure 6b report the surfaces wear tracks Stot,image and volumes Vtotal,image variations as a function of the pH. Before describing them, the hypothesis on pin wear is verified by a comparison of the wear volumes and surfaces calculated from optical approach with the 2D profilometry measurements. On Table 1, values for the two methods are close in neutral and basic solutions. In pH 1.5, a difference of 3% is calculated however it remains in the error bars of the reproducibility tests.

On one hand, the assumption on the pin properties is validated (i.e., mechanically and chemically inert). On the other hand, it allows us to consider the quantifications of surface wear and volume from the optical approach.

In Figure 6a, the variation of the wear surface Stotal,image with the stroke number can be divided into two regions. Below 300∼400 slidings, the wear surface follows a logarithmic evolution for which the wear is mostly controlled by the two bodies surfaces (pin and samples) [START_REF] Cao | Tribocorrosion of passive metals in the mixed lubrication regime: theoretical model and application to metal-on-metal artificial hip joints[END_REF]. Note that the standard deviation leads to some difficulties to clearly detect the role of pH on the damage. In this region, the roughness of the two materials promotes an abrasive contact that enhances the degradation of the material [START_REF] Stachowiak | Tribocorrosion modeling of stainless steel in a sliding pair of pin-on-plate type[END_REF][START_REF] Cao | Assessment of a recent tribocorrosion model for wear of metal-on-metal hip joints: Comparison between model predictions and simulator results[END_REF]. Above 400 slidings, the wear surfaces increase linearly with time in agreement with the linear regime of wear. The slopes (∆Stotal,image /∆t) express the rate of wear and are equal to 4.4 × 10 -6 cm 2 /s, 4.0 × 10 -6 cm 2 /s and 2.7 × 10 -6 cm 2 /s at pH 1.5, pH 6.5 and pH 12.5, respectively. The decrease of ∆Stotal,image/∆t with the pH is consistent with the slowdown of the surface reactivity at higher pH [START_REF] Jemmely | Tribocorrosion behaviour of Fe-17Cr stainless steel in acid and alkaline solutions[END_REF].

Figure 6b reports the wear volume (Vtotal,image) increase with the sliding time and pH. As observed on the wear surface, an increase of pH remains beneficial for the wear reduction. Whatever the test, the volume of loss increases linearly with the sliding as predicted by the Archard's theory [START_REF] Archard | The Wear of Metals under Unlubricated Conditions[END_REF]. Even if this theory was initially developed for sliding in dry condition, it is often used in tribocorrosion until the mechanical contribution is significantly either than the chemical wear in the degradation mechanism [START_REF] Dalmau | Wear model for describing the time dependence of the material degradation mechanisms of the AISI 316L in a NaCl solution[END_REF][START_REF] Cao | Assessment of a recent tribocorrosion model for wear of metal-on-metal hip joints: Comparison between model predictions and simulator results[END_REF]. In the Archard's law, the wear volume Vi (m 3 ) is proportional to the hardness of AISI430, H (Pa or kg.m -1 .s -2 ) and the normal load, F (N or kg.m -1 ). The proportionality or Archard's coefficient k (m 2 .s -2 ) is expressed as a function of sliding distance d (m) (Equation 12). In this work, the Archard's coefficient is proportional to the slope of the curves in Figure 6b.

# "H=Z"H_ = `a.b ,._

Equation. 10

Figure 6c suggests a nonlinear dependence of karchard with pH. It also highlights that karchard is not a simple proportionality factor with a mechanical origin and includes a chemical contribution related to the nature of the passive layer, the surface reactivity etc. This is also reinforced by the nonlinear evolution of the coefficient of friction as already mentioned (Figure 6c).

After tribocorrosion, the worn surfaces were observed by SEM (Figure 7). The micrographs show several grooves perpendicular to the sliding direction online with an abrasion degradation. The metallurgical state of the wear track depends also on the pH. In acidic solution, a chromium enriched oxide film is expected whereas a mix chromium and iron oxide-hydroxide layer grow in neutral and basic solution. The oxide becomes less brittle with the iron injection and the hydroxide part, a material transfer is observed on the pin surface at pH 6.5 and above (in windows capture, Figure 5) [START_REF] Olefjord | Surface analysis of passive state[END_REF][START_REF] Maurice | XPS and STM Study of Passive Films Formed on Fe-22Cr(110) Single-Crystal Surfaces[END_REF][START_REF] Freire | The passive behaviour of AISI 316 in alkaline media and the effect of pH: A combined electrochemical and analytical study[END_REF][START_REF] Haupt | A combined surface analytical and electrochemical study of the formation of passive layers on FeCr alloys in 0.5 M H2SO4[END_REF].

The worn surface partially delaminates in pH 12.5 because of the predominance of the hydroxide nature of the oxide. For this latter, the cross-section SEM image in Figure 7d shows the roughness/waviness of the worn surface partially filled by a third layer enriched in chromium, iron and oxygen (determined by EDS analysis). Even if a hydroxy-oxide layer creates a stronger adhesive interface between the material and the pin at pH 12.5 (Figure 6c), the wear volumes, however, remain lower because of a lower electrochemical reactivity of the surface and a probable higher deformability of the oxide-hydroxide.

Chemical wear volume

Whatever, the method (optical observation) or 2D profile measure, the total wear at the end of the tribocorrosion test can be easily quantify. Since, the passive film is successively damaged and rebuilt, a non-negligible part of the material dissolve in absence of a protective layer. This is called the chemical wear volume (Vwac) and corresponds to the sum of matter release during sliding (Vsliding) and the repassivation process (2D mechanism, V2D).

W c"= = W 3D7_7%9 + W ,78"9 Equation. 11

In Equation 11, the volume of mater dissolved during the pin motion (W 3D7_7%9 ) is calculated from the Faraday law (Equation 12). For each current transient, the current rise is associated to the dissolution of the surface under sliding. The electrical charge (qsliding,i) or the electrical charge density (Qsliding,i) of a single event are calculated from the integration of the current vs time curve (from 0s to 0.2 s, Figure 4a). Where Mss is the molar weight of the stainless steel (55 g/mol), z is the charge of the cations (for Fe and Cr, z is equal to 3), 4 33 is the density of the AISI430 (5.5 g/cm 3 ) and d is the electrical charge associated to the dissolution of the surface during the latency period (2D mechanism).

The chemical wear volumes (Vwac) calculated by Equation 10are reported as a function of the stroke number in Figure 8a. As for the total wear volume, Vwac increases linearly with the sliding distance.

Note that the chemical wear is bigger in pH 1.5 since the dissolution of the material is more significant evenif the surface repassivation is faster. In the total wear volume, the contribution of the chemical wear represents between 10 and 30 % of the volume of material lost (Figure 8b). This percentage remains constant in the linear regime of wear and depends of the solution: lower the pH is, higher Vwac will be.

Conclusions

In situ wear and electrochemical measurements were simultaneously carried out to discuss the tribocorrosion behaviour of a ferritic stainless steel coupled with a graphite electrode. Experiments were performed in acid, neutral and basic 0.1M Na2SO4 solutions. This paper confirms the total wear follows the Archard's law. It also corroborates that the wear rate is controlled by the pH. However, the Archard's coefficient is not a linear function of the pH since the passive film changes in terms of chemistry with pH: iron injection in the chromium layer and stability of hydroxide layer in basic solution. The solution pH is also a key parameter in the kinetics of the oxide growth. The overall repassivation is faster in acidic solution than in neutral solution. This was attributed to the iron stabilisation in the oxide layer. In basic solution, the solubility limit of hydroxide species has to be considered as an agent of repassivation. 2) and covering rate of the fresh surface by passive film nuclei (Equation 3). Variations of c) τ2D and c) τ3D with the stroke number. All fits were obtained with a χ² higher than 0.98. 4.0x10 -7

6.0x10 -7

8.0x10 -7

1.0x10 -6

1.2x10 -6

1.4x10 -6

1.6x10 -6

1.8x10 -6

2.0x10 -6

2.2x10 -6

Archard's coefficient COF

  In situ determinations of the wear surfaces, volumes and kinetics of repassivation: Contribution in the understanding of the tribocorrosion behaviour of a ferritic stainless steel in various pH V. Dalbert, Nicolas Mary, Bernard Normand, Catherine Verdu, S. Saedlou To cite this version: V. Dalbert, Nicolas Mary, Bernard Normand, Catherine Verdu, S. Saedlou. In situ determinations of the wear surfaces, volumes and kinetics of repassivation: Contribution in the understanding of the tribocorrosion behaviour of a ferritic stainless steel in various pH. Tribology International, 2020, 150, pp.106374. 10.1016/j.triboint.2020.106374. hal-02970986 2 Highlights:

Figure 1 .Figure 2 Figure 3 .Figure 4

 1234 Figure 1. Schematic representation of the tribocorrosion cell with the implementation of the optical microscope, the half-moon shape graphite electrode, the reference electrode and the corundum pin. The cell volume is equal to 40 ml.

Figure 5 .

 5 Figure 5. Wear track images after b) 180 and c) 1480 sliding in acidic solution. d) Description of the pin penetration model and d) wear track profiles after tribocorrosion tests

Figure 6 .

 6 Figure 6. Variations of a) the wear surface and b) the wear volume determined from the optical observations of the wear tracks as a function of the solution pH. c) Average coefficient of friction (COF) and Archard's coefficient as a function of pH

Figure 7 .Figure 8

 78 Figure 7. SEM observations of the worn surfaces in a) pH 1.5, b) pH 6.5 and c) pH 12.5. d) cross section observation of the wear track at pH 12.5. Pin surfaces are in the windows images.

Table 1 .

 1 Repassivation time constants (τ2D and τ3D), wear surfaces and volumes from the analysis of optical images recorded along the sliding (Stotal,image, Vtotal,image) and 2D profiles recorded after the experiments (Stotal, 2Dprofile, Vtotal, profile).

		Time constant	Wear surfaces	Wear Volumes
		(s) ± 0.01	(cm 2 ) ± 0.01	(x 10 -5 cm 3 ) ±0.3 x10 -5
	pH
		τ2D	τ3D	Stotal,image Stotal,2Dprofile	Vtotal,2Dprofile	Vtotal,image
	1.5	0.19	1.18	0.11	0.12	3.8	4.0
	6.5	0.30	1.69	0.09	0.09	2.8	2.7
	12.5	0.21	1.67	0.07	0.08	0.9	0.9