Re: [PATCH] trace-cmd: Try alternate path for message cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 29 Mar 2022 19:18:01 +0000
Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:

> For some systems like Android, /tmp/ does not exist. Use the /data/
> directory for message cache.
> 
> With this, host guest tracing works on Android VM running on ChromeOS.
> 
> Cc: Vineeth Pillai <vineethrp@xxxxxxxxxx>
> Signed-off-by: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>
> ---
>  lib/trace-cmd/include/private/trace-cmd-private.h |  3 ++-
>  lib/trace-cmd/trace-msg.c                         | 10 ++++++++--
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
> index 6934376..492ad9c 100644
> --- a/lib/trace-cmd/include/private/trace-cmd-private.h
> +++ b/lib/trace-cmd/include/private/trace-cmd-private.h
> @@ -377,7 +377,8 @@ enum tracecmd_msg_flags {
>  };
>  
>  /* for both client and server */
> -#define MSG_CACHE_FILE "/tmp/trace_msg_cacheXXXXXX"
> +#define MSG_CACHE_FILE  "/tmp/trace_msg_cacheXXXXXX"
> +#define MSG_CACHE_FILE2 "/data/trace_msg_cacheXXXXXX"

Hmm,

I think I rather have an environment variable that can override the
default, and not just hardcode in paths that might work.

export TRACECMD_TEMPDIR="/data"

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux